Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Console.WriteLine("What do you want to do?");
- Console.WriteLine("1. Eat");
- Console.WriteLine("2. Drink");
- Console.WriteLine("3. Play");
- string answer = Console.ReadLine();
- if (answer == "1")
- {
- Console.WriteLine("you picked number 1");
- }
- if (answer == "2")
- {
- Console.WriteLine("You picked number 2");
- }
- if (answer == "3")
- {
- Console.WriteLine("You picked number 3");
- }
- // 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