Advertisement
PIBogdanov

dice1

Feb 18th, 2023
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.28 KB | None | 0 0
  1. #include <iostream>
  2. #include <time.h>
  3. #include <random>
  4.  
  5. using namespace std;
  6.  
  7. int main()
  8. {
  9.     srand(time(NULL));
  10.  
  11.     string input;
  12.     cin >> input;
  13.  
  14.     int value = rand() % 6 + 1;
  15.  
  16.     if (input == "Throw")
  17.     {
  18.         cout << value;
  19.     }
  20.  
  21.     return 0;
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement