Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static void Main(string[] args)
- {
- string numberOfApples = "0";
- Console.WriteLine("How many apples do you want");
- numberOfApples = Console.ReadLine();
- while(int.Parse(numberOfApples) >= 0)
- {
- Console.WriteLine("Do you need another bag");
- string response = Console.ReadLine();
- if (response == "yes" && int.Parse(numberOfApples) == 10)
- {
- Console.WriteLine("You will need 2 bags");
- Console.WriteLine("Next please!");
- }
- }
- Console.ReadLine();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement