Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- int main ()
- {
- for ( int x = 1; int x != 0; ) {
- 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;
- std::cout << "[1] How old are you?" << std::endl;
- std::cout << "[2] What is my name?" << std::endl;
- std::cout << "[3] What is my favorite color?" << std::endl;
- std::cout << "[4] How tall am I?" << std::endl;
- std::cout << "[5] How much do I weigh?" << std::endl;
- std::cout << "[0] Quit" << std::endl;
- std::cin >> x;
- if (x==1)
- {
- std::cout << "I am 19 years old" << std::endl;
- }
- else if (x==2)
- {
- std::cout << "My name is Gabriel Cruz Peralta" << std::endl;
- }
- else if (x==3)
- {
- std::cout << "Purple!" << std::endl;
- }
- else if (x==4)
- {
- std::cout << "I am 5ft 6in" << std::endl;
- }
- else if (x==5)
- {
- std::cout << "156lbs" << std::endl;
- }
- else if ( x == 0 )
- {
- continue;
- }
- else
- {
- std::cout << "Sorry, didn't quite catch that; try again?" << std::endl;
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement