Advertisement
Guest User

Untitled

a guest
Nov 10th, 2013
226
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.36 KB | None | 0 0
  1. #include <iostream>
  2. #include <fstream>
  3. #include <vector>
  4. #include <set>
  5. #include <map>
  6. #include <cmath>
  7. #include <algorithm>
  8.  
  9. using namespace std;
  10.  
  11. int main()
  12. {
  13.     string S = "a";
  14.     int n;
  15.     while (S[0] != 'S')
  16.     {
  17.         cin >> n;
  18.         cout << rand() % n + 1 << '\n';
  19.         cout.flush();
  20.         cin >> S;
  21.     }
  22.     return 0;
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement