daily pastebin goal
53%
SHARE
TWEET

Untitled

a guest Jun 14th, 2018 61 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  #include <iostream>
  2.  
  3. int main ()
  4. {
  5.     for ( int x = 1; int x != 0; ) {
  6.         std::cout << "Enter in what you want to know. If you want to know multiple things type in the numbers you want with a , separating them." << std::endl;
  7.         std::cout << "[1] How old are you?" << std::endl;
  8.         std::cout << "[2] What is my name?" << std::endl;
  9.         std::cout << "[3] What is my favorite color?" << std::endl;
  10.         std::cout << "[4] How tall am I?" << std::endl;
  11.         std::cout << "[5] How much do I weigh?" << std::endl;
  12.         std::cout << "[0] Quit" << std::endl;
  13.  
  14.         std::cin >> x;
  15.  
  16.  
  17.         if (x==1)
  18.         {
  19.             std::cout << "I am 19 years old" << std::endl;
  20.         }
  21.         else if (x==2)
  22.         {
  23.             std::cout << "My name is Gabriel Cruz Peralta" << std::endl;
  24.         }
  25.         else if (x==3)
  26.         {
  27.             std::cout << "Purple!" << std::endl;
  28.         }
  29.         else if (x==4)
  30.         {
  31.             std::cout << "I am 5ft 6in" << std::endl;
  32.         }
  33.         else if (x==5)
  34.         {
  35.             std::cout << "156lbs" << std::endl;
  36.         }
  37.         else if ( x == 0 )
  38.         {
  39.             continue;
  40.         }
  41.         else
  42.         {
  43.             std::cout << "Sorry, didn't quite catch that; try again?" << std::endl;
  44.         }
  45.     }
  46.  
  47. return 0;
  48. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top