fork 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. }
Success #stdin #stdout 0s 3296KB
stdin
Standard input is empty
stdout
9
7