Advertisement
Jayss8

WCIPEG Rock Paper Scissors Fox (C++)

Jul 7th, 2014
239
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.46 KB | None | 0 0
  1. #include <iostream>
  2. #include <string>
  3.  
  4. using namespace std;
  5.  
  6. int main()
  7. {
  8.     int n;
  9.     string s[50];
  10.  
  11.     cin >> n;
  12.  
  13.     for (int i = 0; i <= n - 1; n++)
  14.     {
  15.         cin >> s[i];
  16.  
  17.         if (s[i] == "Rock")
  18.         {
  19.             cout << "Paper\n";
  20.         }
  21.         else if (s[i] == "Paper")
  22.         {
  23.             cout << "Scissors\n";
  24.         }
  25.         else if (s[i] == "Scissors")
  26.         {
  27.             cout << "Rock\n";
  28.         }
  29.         else if (s[i] == "Fox")
  30.         {
  31.             cout << "Foxen\n";
  32.         }
  33.         else
  34.         {
  35.             return 0;
  36.         }
  37.     }
  38.     return 0;
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement