fork(1) 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. }
  14.  
  15. //https://pt.stackoverflow.com/q/44727/101
Success #stdin #stdout 0s 15232KB
stdin
Standard input is empty
stdout
9
7