Created
April 24, 2018 00:50
-
-
Save Luccasoli/c194cbe53de7018bab7fe2537b484424 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <bits/stdc++.h> | |
using namespace std; | |
class Numero{ | |
public: | |
int valor; | |
int gera_num(){ | |
valor = rand() % 10000 + 1; | |
} | |
int somatorio(){ | |
int soma = 0; | |
for (int i = 1; i <= valor; ++i) | |
{ | |
soma += i; | |
} | |
return soma; | |
} | |
Numero(){ | |
gera_num(); | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment