Skip to content

Instantly share code, notes, and snippets.

@Luccasoli
Created April 24, 2018 00:50
Show Gist options
  • Save Luccasoli/c194cbe53de7018bab7fe2537b484424 to your computer and use it in GitHub Desktop.
Save Luccasoli/c194cbe53de7018bab7fe2537b484424 to your computer and use it in GitHub Desktop.
#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