fork download
  1. #include <iostream>
  2. #include <cstdlib>
  3. #include <ctime>
  4. using namespace std;
  5.  
  6. int main() {
  7. srand(time(NULL));
  8. cout << "Dado_1: " << rand() % 6 + 1 << "\n";
  9. cout << "Dado_2: " << rand() % 6 + 1 << "\n";
  10. }
  11.  
  12. //http://pt.stackoverflow.com/q/189434/101
Success #stdin #stdout 0s 15240KB
stdin
Standard input is empty
stdout
Dado_1: 4
Dado_2: 1