Advertisement
saluxx

de

Oct 22nd, 2015
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. Console.WriteLine("What do you want to do?");
  2. Console.WriteLine("1. Eat");
  3. Console.WriteLine("2. Drink");
  4. Console.WriteLine("3. Play");
  5. string answer = Console.ReadLine();
  6.  
  7. if (answer == "1")
  8. {
  9. Console.WriteLine("you picked number 1");
  10. }
  11. if (answer == "2")
  12. {
  13. Console.WriteLine("You picked number 2");
  14. }
  15. if (answer == "3")
  16. {
  17. Console.WriteLine("You picked number 3");
  18. }
  19.  
  20.  
  21. // if answer isn't 1,2 or 3, keep asking the question untill the input is correct.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement