fork(1) download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. auto gerador = []() { return 5 + rand() % 5 + 1; };
  6. int number = gerador();
  7. cout << number << endl;
  8. number = gerador();
  9. cout << number << endl;
  10. }
  11.  
  12. //https://pt.stackoverflow.com/q/44727/101
Success #stdin #stdout 0s 15232KB
stdin
Standard input is empty
stdout
9
7