KeeganT

Culminating

Dec 14th, 2017
395
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 18.34 KB | None | 0 0
  1. #include <iostream>
  2. #include <windows.h>
  3. #include <stdlib.h>
  4. #include <time.h>
  5. #include <sstream>
  6. #include <fstream>
  7.  
  8. using namespace std;
  9.  
  10. void color(int num)
  11. {
  12.     HANDLE color=GetStdHandle(STD_OUTPUT_HANDLE);
  13.     SetConsoleTextAttribute(color, num);
  14. }
  15.  
  16. ///Tic Tac Toe--------------------------------------------
  17.  
  18. char spots[]{'1','2','3','4','5','6','7','8','9'};
  19. bool hasWon=false, hasFound=false;
  20. char p1input, p2input;
  21. char nums[]{'1','2','3','4','5','6','7','8','9'};
  22.  
  23. void board()
  24. {
  25.     system("cls");
  26.     cout<<endl;
  27.     cout<<"\t\t "<<spots[0]<<" | "<<spots[1]<<" | "<<spots[2]<<" "<<endl;
  28.     cout<<"\t\t---+---+---"<<endl;
  29.     cout<<"\t\t "<<spots[3]<<" | "<<spots[4]<<" | "<<spots[5]<<" "<<endl;
  30.     cout<<"\t\t---+---+---"<<endl;
  31.     cout<<"\t\t "<<spots[6]<<" | "<<spots[7]<<" | "<<spots[8]<<" "<<endl;
  32.     cout<<endl;
  33. }
  34.  
  35. void winCheck()
  36. {
  37.     if(spots[0]=='X'&&spots[1]=='X'&&spots[2]=='X')hasWon=true;
  38.     if(spots[3]=='X'&&spots[4]=='X'&&spots[5]=='X')hasWon=true;
  39.     if(spots[6]=='X'&&spots[7]=='X'&&spots[8]=='X')hasWon=true;
  40.     if(spots[0]=='X'&&spots[3]=='X'&&spots[6]=='X')hasWon=true;
  41.     if(spots[1]=='X'&&spots[4]=='X'&&spots[7]=='X')hasWon=true;
  42.     if(spots[2]=='X'&&spots[5]=='X'&&spots[8]=='X')hasWon=true;
  43.     if(spots[2]=='X'&&spots[4]=='X'&&spots[6]=='X')hasWon=true;
  44.     if(spots[0]=='X'&&spots[4]=='X'&&spots[8]=='X')hasWon=true;
  45.     if(spots[2]=='X'&&spots[4]=='X'&&spots[6]=='X')hasWon=true;
  46.     if(spots[0]=='O'&&spots[1]=='O'&&spots[2]=='O')hasWon=true;
  47.     if(spots[3]=='O'&&spots[4]=='O'&&spots[5]=='O')hasWon=true;
  48.     if(spots[6]=='O'&&spots[7]=='O'&&spots[8]=='O')hasWon=true;
  49.     if(spots[0]=='O'&&spots[3]=='O'&&spots[6]=='O')hasWon=true;
  50.     if(spots[1]=='O'&&spots[4]=='O'&&spots[7]=='O')hasWon=true;
  51.     if(spots[2]=='O'&&spots[5]=='O'&&spots[8]=='O')hasWon=true;
  52.     if(spots[2]=='O'&&spots[4]=='O'&&spots[6]=='O')hasWon=true;
  53. }
  54.  
  55. void p1move()
  56. {
  57.     for(int c=0;c<9;c++)
  58.     {
  59.         for(int x=0;x<9;x++)
  60.         {
  61.             if(p1input==nums[x])hasFound=true;
  62.             if(x==8&&hasFound==false)
  63.             {
  64.                 cout<<"That is not a choice! Please pick a number on the board!"<<endl;
  65.                 cin>>p1input;
  66.             }
  67.         }
  68.         hasFound=false;
  69.         while(p1input==nums[c]&&spots[c]!=nums[c])
  70.         {
  71.             cout<<"Someone has already taken this spot! Please pick another!"<<endl;
  72.             cin>>p1input;
  73.         }
  74.         if(p1input==nums[c]&&spots[c]!='X'&&spots[c]!='O')spots[c]='X';
  75.     }
  76. }
  77.  
  78. void p2move()
  79. {
  80.     for(int c=0;c<9;c++)
  81.     {
  82.         for(int x=0;x<9;x++)
  83.         {
  84.             if(p2input==nums[x])hasFound=true;
  85.             if(x==8&&hasFound==false)
  86.             {
  87.                 cout<<"That is not a choice! Please pick a number on the board!"<<endl;
  88.                 cin>>p2input;
  89.             }
  90.         }
  91.         hasFound=false;
  92.         while(p2input==nums[c]&&spots[c]!=nums[c])
  93.         {
  94.             cout<<"Someone has already taken this spot! Please pick another!"<<endl;
  95.             cin>>p2input;
  96.         }
  97.         if(p2input==nums[c]&&spots[c]!='X'&&spots[c]!='O')spots[c]='O';
  98.     }
  99. }
  100.  
  101. int ticMain()
  102. {
  103.     cout<<"Welcome to Tic Tac Toe!"<<endl;
  104.     cout<<"-----------------------"<<endl;
  105.     cout<<"In order to play, you need two players!"<<endl;
  106.     cout<<"Player one is 'X', and player two is 'O'"<<endl;
  107.     cout<<"Press any key to begin!"<<endl;
  108.     system("pause>null");
  109.     board();
  110.     int winner=2, round=0;
  111.     while(hasWon==false)
  112.     {
  113.         cout<<"Player 1, where would you like to move?"<<endl;
  114.         cin>>p1input;
  115.         p1move();
  116.         system("cls");
  117.         board();
  118.         winCheck();
  119.         if(hasWon==true)
  120.         {
  121.             winner=1;
  122.             break;
  123.         }
  124.         round++;
  125.         if(round==9&&hasWon==false)break;
  126.         cout<<"Player 2, where would you like to move?"<<endl;
  127.         cin>>p2input;
  128.         p2move();
  129.         system("cls");
  130.         board();
  131.         winCheck();
  132.         round++;
  133.         if(round==9&&hasWon==false)break;
  134.     }
  135.     if(round!=9)cout<<"Player "<<winner<<" is the winner!"<<endl;
  136.     else cout<<"It's a tie!"<<endl;
  137. }
  138.  
  139. ///Master Mind-----------------------------------------
  140.  
  141. string code;
  142. string codeArr[9];
  143. int gameLength=10;
  144. int array[9];
  145.  
  146. void explain()
  147. {
  148.     color(13);
  149.     system("cls");
  150.     cout<<"Welcome to Mastermind!"<<endl;
  151.     cout<<"----------------------"<<endl;
  152.     cout<<"The computer will generate a random 4 digit number with NO repeating digits."<<endl;
  153.     cout<<"The objective of the game is for you to guess that 4 digit number."<<endl;
  154.     cout<<"The computer responds with how close your guess is to the number."<<endl;
  155.     cout<<"Red = Number of correct digits in the correct place."<<endl;
  156.     cout<<"White = Number of correct digits in the wrong place."<<endl;
  157.     cout<<"Good luck! Press any key to return to the menu."<<endl;
  158.     color(7);
  159.     system("pause>nul");
  160. }
  161.  
  162. int changeLength()
  163. {
  164.     system("cls");
  165.     cout<<"How many turns do you want the game to last?"<<endl;
  166.     cin>>gameLength;
  167.  
  168. }
  169.  
  170. void generateNumber()
  171. {
  172.     srand(time(NULL));
  173.     int temp;
  174.     string tempString;
  175.     for(int c=0;c<9;c++)array[c]=c+1;
  176.     for(int c=0;c<9;c++)
  177.     {
  178.         int x=rand()%4+1;
  179.         temp=array[c];
  180.         array[c]=array[x];
  181.         array[x]=temp;
  182.     }
  183.     for(int c=0;c<4;c++)
  184.     {
  185.         stringstream convert;
  186.         convert<<array[c];
  187.         tempString=convert.str();
  188.         code+=tempString;
  189.     }
  190.     for(int c=0;c<4;c++)
  191.     {
  192.         stringstream convert;
  193.         convert<<array[c];
  194.         codeArr[c]=convert.str();
  195.     }
  196. }
  197.  
  198. int game()
  199. {
  200.     int turnCount=1;
  201.     for(int c=0;c<gameLength;c++)
  202.     {
  203.         string guess="";
  204.         int bullCount=0, cowCount=0;
  205.         cout<<"Attempt "<<turnCount<<endl;
  206.         cout<<"Enter your guess: "<<endl;
  207.         cin>>guess;
  208.         while(guess[0]==guess[1]||guess[0]==guess[2]||guess[0]==guess[3]||guess[1]==guess[2]||guess[1]==guess[3]||guess[2]==guess[3])
  209.         {
  210.             cout<<"Your guess should not have repeating digits! Try again."<<endl;
  211.             cout<<"Enter your guess: ";
  212.             cin>>guess;
  213.         }
  214.         if(c==gameLength-1&&guess!=code)
  215.         {
  216.             color(8);
  217.             cout<<"You ran out of attempts! Better luck next time! The code was "<<code<<endl;
  218.             cout<<"Press any key to return to the main menu."<<endl;
  219.             color(7);
  220.             system("pause>nul");
  221.         }
  222.         if(guess==code)
  223.         {
  224.             cout<<"Congratulations! You got the code in "<<turnCount<<" attempts! You win!"<<endl;
  225.             cout<<"Press any key to return to the main menu."<<endl;
  226.             system("pause>nul");
  227.             return 0;
  228.         }
  229.         turnCount++;
  230.         for(int c=0;c<4;c++)
  231.         {
  232.             if(guess[c]==code[c])
  233.             bullCount++;
  234.             int num=guess.find(codeArr[c]);
  235.             if(num!=-1)cowCount++;
  236.         }
  237.         color(12);
  238.         cout<<"Red: "<<bullCount<<endl;
  239.         color(15);
  240.         cout<<"White: "<<cowCount<<endl;
  241.         color(7);
  242.         cout<<"-----------------"<<endl;
  243.     }
  244. }
  245.  
  246. int masterMain()
  247. {
  248.     int choice;
  249.     do{
  250.         system("cls");
  251.         cout<<"Welcome to MasterMind"<<endl;
  252.         cout<<"     1) Play"<<endl;
  253.         cout<<"  2) Instructions"<<endl;
  254.         cout<<"3) Change Game Length"<<endl;
  255.         cout<<"   (Currently "<<gameLength<<")"<<endl;
  256.         cout<<"     4) Exit"<<endl;
  257.         cin>>choice;
  258.         if(choice==1)
  259.         {
  260.             system("cls");
  261.             generateNumber();
  262.             game();
  263.         }
  264.         if(choice==2)explain();
  265.         if(choice==3)changeLength();
  266.         if(choice==4)break;
  267.         code="";
  268.     }while(true);
  269. }
  270.  
  271. ///Blackjack-------------------------------------------
  272.  
  273. int blackjackMain()
  274. {
  275.     srand(time(NULL));
  276.     int randomCard=rand()%11+1, again=1;
  277.     do{
  278.     int computer=randomCard, player=randomCard, play, turnCount=1;
  279.     system("cls");
  280.     do{
  281.     computer+=randomCard;
  282.     turnCount++;
  283.     }while(computer<=16&&turnCount<=5);
  284.     randomCard=(rand()%11)+1;
  285.     turnCount=2;
  286.     do{
  287.     player+=randomCard;
  288.     if(player>=22)break;
  289.     cout<<"Your cards add up to: "<<player<<" | Card number "<<turnCount<< endl;
  290.     cout<<"1=hit 0=stay" <<endl;
  291.     cin>>play;
  292.     turnCount++;
  293.     system("cls");
  294.     }while(play!=0&&turnCount<=5);
  295.     if(player==computer&&player<=21&&computer<=21)cout<<"You had "<<player<<"\nThe computer had "<<computer<<"\tIT'S A TIE!"<<endl;
  296.     if(player>=22&&computer>=22)cout<<"You both went over 21,\nIT'S A TIE!"<<endl;
  297.     if(player>=22&&computer<=21)cout<<"You went over 21, you had "<<player<<"\nYOU LOST!"<<endl;
  298.     if(computer>=22&&player<=21)cout<<"The computer has gone over 21 \nYOU WIN!"<<endl;
  299.     if(computer<player&&player<=21&&computer<=21)cout<<"You had "<<player<<"\nThe computer had "<<computer<<"\nYOU WIN!"<<endl;
  300.     if(computer>player&&player<=21&&computer<=21)cout<<"You had "<<player<<"\nThe computer had "<<computer<<"\nYOU LOST!"<<endl;
  301.     cout<<"Play Again?"<<endl;
  302.     cout<<"1=Yes 0=No"<<endl;
  303.     cin>>again;
  304.     }while(again==1);
  305.     cout<<"Thanks for playing!"<<endl;
  306. }
  307.  
  308. ///Hangman---------------------------------------------
  309.  
  310. string word;
  311. void hangman0();
  312. void hangman1();
  313. void hangman2();
  314. void hangman3();
  315. void hangman4();
  316. void hangman5();
  317. void hangman6();
  318. void hangman7();
  319. bool over=false;
  320.  
  321. void randomWord()
  322. {
  323.     srand(time(NULL));
  324.     int num=rand()%27+1;
  325.     string words[43];
  326.     string text;
  327.     ifstream file("words.txt");
  328.     for(int c=0;file>>text;c++)words[c]=text;
  329.     word=words[num];
  330. }
  331.  
  332. int hangmanMain()
  333. {
  334.     randomWord();
  335.     int count=0;
  336.     string text;
  337.     string theWord[word.length()];
  338.     string guessedLetters="";
  339.     for(int c=0;c<word.length();c++)theWord[c]+="?";
  340.     int hangman=0;
  341.     while(hangman!=7&&over==false)
  342.     {
  343.         if(count==0)
  344.         {
  345.             cout<<"Your word is "<<word.length()<<" letters long!"<<endl;
  346.             for(int c=0;c<word.length();c++)cout<<theWord[c]<<" ";
  347.             cout<<endl;
  348.             hangman0();
  349.         }
  350.         else
  351.         {
  352.             for(int c=0;c<word.length();c++)cout<<theWord[c]<<" ";
  353.             cout<<"\t\tGuessed letters: ";
  354.             for(int c=0;c<count;c++)cout<<guessedLetters[c];
  355.         }
  356.         cout<<endl;
  357.         if(count==0)cout<<"If you would like to guess a letter, type in a letter,\nif you would like to guess the word, type 'guess' ";
  358.         else cout<<"Enter your guess (Or type guess to guess the word): "<<endl;
  359.         cin>>text;
  360.         while(text.length()>1&&text!="guess")
  361.         {
  362.             cout<<"Invalid input! Please enter a character or 'guess': ";
  363.             cin>>text;
  364.         }
  365.         while(guessedLetters.find(text)!=string::npos)
  366.         {
  367.             cout<<"You already guessed this letter! Enter another one: ";
  368.             cin>>text;
  369.         }
  370.         system("cls");
  371.         guessedLetters+=text;
  372.         if(text=="guess")
  373.         {
  374.             string guess;
  375.             cout<<"What do you think the word is? ";
  376.             cin>>guess;
  377.             if(guess==word)
  378.             {
  379.                 cout<<"Congratulations! You guessed the word correctly!"<<endl;
  380.                 over=true;
  381.             }
  382.             else
  383.             {
  384.                 cout<<"Sorry! That's incorrect! The word was "<<word<<". Better luck next time."<<endl;
  385.                 over=true;
  386.             }
  387.         }
  388.         if(word.find(text)!=string::npos)
  389.         {
  390.             int num=word.find(text);
  391.             theWord[num]=text;
  392.             int num2=word.rfind(text);
  393.             theWord[num2]=text;
  394.             cout<<"Letter found!"<<endl;
  395.         }
  396.         else if(word.find(text)==string::npos&&over==false)
  397.         {
  398.             cout<<"Letter not found!"<<endl;
  399.             hangman++;
  400.         }
  401.         if(over==false)
  402.         {
  403.             if(hangman==0)hangman0();
  404.             else if(hangman==1)hangman1();
  405.             else if(hangman==2)hangman2();
  406.             else if(hangman==3)hangman3();
  407.             else if(hangman==4)hangman4();
  408.             else if(hangman==5)hangman5();
  409.             else if(hangman==6)hangman6();
  410.             else if(hangman==7)hangman7();
  411.             count++;
  412.         }
  413.     }
  414.     cout<<"Sorry! You lost! The word was "<<word<<". Better luck next time."<<endl;
  415. }
  416.  
  417. ///Other----------------------------------------------------------
  418.  
  419. int choose(int choice)
  420. {
  421.     if(choice==1)ticMain();
  422.     else if(choice==2)masterMain();
  423.     else if(choice==3)blackjackMain();
  424.     else if(choice==4)hangmanMain();
  425.     else if(choice==5)return 0;
  426. }
  427.  
  428. void menu();
  429.  
  430. int main()
  431. {
  432.     system("title Game Menu");
  433.     HWND currentWindow=FindWindow(0,"Game Menu");
  434.     SetWindowPos(currentWindow,0,300,200,630,420,SWP_SHOWWINDOW);
  435.     int choice2=1;
  436.     while(choice2!=2)
  437.     {
  438.         int choice;
  439.         menu();
  440.         cin>>choice;
  441.         system("cls");
  442.         choose(choice);
  443.         cout<<"1) Return to Main Menu"<<endl;
  444.         cout<<"2) Exit"<<endl;
  445.         cin>>choice2;
  446.         system("cls");
  447.     }
  448.     cout<<"Thanks for stopping by!"<<endl;
  449. }
  450.  
  451. ///Visuals---------------------------------------------------------
  452.  
  453. void menu()
  454. {
  455.     color(15);
  456.     cout<<"\n\t\t              +------------+              "<<endl;
  457.     cout<<"\t\t+-----------=~| ";
  458.     color(13);
  459.     cout<<"Main  Menu";
  460.     color(15);
  461.     cout<<" |~=-----------+"<<endl;
  462.     cout<<"\t\t|             +------------+             |"<<endl;
  463.     cout<<"\t\t|                                        |"<<endl;
  464.     cout<<"\t\t|           +----------------+           |"<<endl;
  465.     cout<<"\t\t|           | ";
  466.     color(10);
  467.     cout<<"1) Tic Tac Toe";
  468.     color(15);
  469.     cout<<" |           |"<<endl;
  470.     cout<<"\t\t|           +----------------+           |"<<endl;
  471.     cout<<"\t\t|                                        |"<<endl;
  472.     cout<<"\t\t|           +----------------+           |"<<endl;
  473.     cout<<"\t\t|           | ";
  474.     color(9);
  475.     cout<<"2) Master Mind";
  476.     color(15);
  477.     cout<<" |           |"<<endl;
  478.     cout<<"\t\t|           +----------------+           |"<<endl;
  479.     cout<<"\t\t|                                        |"<<endl;
  480.     cout<<"\t\t|           +----------------+           |"<<endl;
  481.     cout<<"\t\t|           |  ";
  482.     color(11);
  483.     cout<<"3) Blackjack";
  484.     color(15);
  485.     cout<<"  |           |"<<endl;
  486.     cout<<"\t\t|           +----------------+           |"<<endl;
  487.     cout<<"\t\t|                                        |"<<endl;
  488.     cout<<"\t\t|           +----------------+           |"<<endl;
  489.     cout<<"\t\t|           |   ";
  490.     color(14);
  491.     cout<<"4) Hangman";
  492.     color(15);
  493.     cout<<"   |           |"<<endl;
  494.     cout<<"\t\t|           +----------------+           |"<<endl;
  495.     cout<<"\t\t|                                        |"<<endl;
  496.     cout<<"\t\t|           +----------------+           |"<<endl;
  497.     cout<<"\t\t|           |   ";
  498.     color(12);
  499.     cout<<" 5) Exit ";
  500.     color(15);
  501.     cout<<"    |           |"<<endl;
  502.     cout<<"\t\t|           +----------------+           |"<<endl;
  503.     cout<<"\t\t|                                        |"<<endl;
  504.     cout<<"\t\t+----------------------------------------+"<<endl;
  505. }
  506.  
  507. void hangman0()
  508. {
  509.     cout<<"\t\t\t\t    +------+"<<endl;
  510.     cout<<"\t\t\t\t    |      |"<<endl;
  511.     cout<<"\t\t\t\t    |      |"<<endl;
  512.     cout<<"\t\t\t\t           |"<<endl;
  513.     cout<<"\t\t\t\t           |"<<endl;
  514.     cout<<"\t\t\t\t           |"<<endl;
  515.     cout<<"\t\t\t\t           |"<<endl;
  516.     cout<<"\t\t\t\t           |"<<endl;
  517.     cout<<"\t\t\t\t      ==========="<<endl;
  518. }
  519.  
  520. void hangman1()
  521. {
  522.     cout<<"\t\t\t\t    +------+"<<endl;
  523.     cout<<"\t\t\t\t    |      |"<<endl;
  524.     cout<<"\t\t\t\t    |      |"<<endl;
  525.     cout<<"\t\t\t\t    O      |"<<endl;
  526.     cout<<"\t\t\t\t           |"<<endl;
  527.     cout<<"\t\t\t\t           |"<<endl;
  528.     cout<<"\t\t\t\t           |"<<endl;
  529.     cout<<"\t\t\t\t           |"<<endl;
  530.     cout<<"\t\t\t\t      ==========="<<endl;
  531. }
  532. void hangman2()
  533. {
  534.     cout<<"\t\t\t\t    +------+"<<endl;
  535.     cout<<"\t\t\t\t    |      |"<<endl;
  536.     cout<<"\t\t\t\t    |      |"<<endl;
  537.     cout<<"\t\t\t\t    O      |"<<endl;
  538.     cout<<"\t\t\t\t    |      |"<<endl;
  539.     cout<<"\t\t\t\t           |"<<endl;
  540.     cout<<"\t\t\t\t           |"<<endl;
  541.     cout<<"\t\t\t\t           |"<<endl;
  542.     cout<<"\t\t\t\t      ==========="<<endl;
  543. }
  544. void hangman3()
  545. {
  546.     cout<<"\t\t\t\t    +------+"<<endl;
  547.     cout<<"\t\t\t\t    |      |"<<endl;
  548.     cout<<"\t\t\t\t    |      |"<<endl;
  549.     cout<<"\t\t\t\t    O      |"<<endl;
  550.     cout<<"\t\t\t\t   -|      |"<<endl;
  551.     cout<<"\t\t\t\t           |"<<endl;
  552.     cout<<"\t\t\t\t           |"<<endl;
  553.     cout<<"\t\t\t\t           |"<<endl;
  554.     cout<<"\t\t\t\t      ==========="<<endl;
  555. }
  556. void hangman4()
  557. {
  558.     cout<<"\t\t\t\t    +------+"<<endl;
  559.     cout<<"\t\t\t\t    |      |"<<endl;
  560.     cout<<"\t\t\t\t    |      |"<<endl;
  561.     cout<<"\t\t\t\t    O      |"<<endl;
  562.     cout<<"\t\t\t\t   -|-     |"<<endl;
  563.     cout<<"\t\t\t\t           |"<<endl;
  564.     cout<<"\t\t\t\t           |"<<endl;
  565.     cout<<"\t\t\t\t           |"<<endl;
  566.     cout<<"\t\t\t\t      ==========="<<endl;
  567. }
  568. void hangman5()
  569. {
  570.     cout<<"\t\t\t\t    +------+"<<endl;
  571.     cout<<"\t\t\t\t    |      |"<<endl;
  572.     cout<<"\t\t\t\t    |      |"<<endl;
  573.     cout<<"\t\t\t\t    O      |"<<endl;
  574.     cout<<"\t\t\t\t   -|-     |"<<endl;
  575.     cout<<"\t\t\t\t    |      |"<<endl;
  576.     cout<<"\t\t\t\t           |"<<endl;
  577.     cout<<"\t\t\t\t           |"<<endl;
  578.     cout<<"\t\t\t\t      ==========="<<endl;
  579. }
  580. void hangman6()
  581. {
  582.     cout<<"\t\t\t\t    +------+"<<endl;
  583.     cout<<"\t\t\t\t    |      |"<<endl;
  584.     cout<<"\t\t\t\t    |      |"<<endl;
  585.     cout<<"\t\t\t\t    O      |"<<endl;
  586.     cout<<"\t\t\t\t   -|-     |"<<endl;
  587.     cout<<"\t\t\t\t    |      |"<<endl;
  588.     cout<<"\t\t\t\t   /       |"<<endl;
  589.     cout<<"\t\t\t\t           |"<<endl;
  590.     cout<<"\t\t\t\t      ==========="<<endl;
  591. }
  592. void hangman7()
  593. {
  594.     cout<<"\t\t\t\t    +------+"<<endl;
  595.     cout<<"\t\t\t\t    |      |"<<endl;
  596.     cout<<"\t\t\t\t    |      |"<<endl;
  597.     cout<<"\t\t\t\t    O      |"<<endl;
  598.     cout<<"\t\t\t\t   -|-     |"<<endl;
  599.     cout<<"\t\t\t\t    |      |"<<endl;
  600.     cout<<"\t\t\t\t   / \\     |"<<endl;
  601.     cout<<"\t\t\t\t           |"<<endl;
  602.     cout<<"\t\t\t\t      ==========="<<endl;
  603. }
Advertisement
Add Comment
Please, Sign In to add comment