fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int gerador() {
  5. return 5 + rand() % 5 + 1;
  6. }
  7.  
  8. int main() {
  9. int number = gerador();
  10. cout << number << endl;
  11. number = gerador();
  12. cout << number << endl;
  13. }
Success #stdin #stdout 0s 3340KB
stdin
Standard input is empty
stdout
9
7