Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int count = -1;
- do
- {
- var input = (Console.ReadLine());
- count++;
- if (input == "Bake!")
- {
- Console.WriteLine($"Preparing cake with {count} ingredients.");
- break;
- }
- Console.WriteLine($"Adding ingredient {input}.");
- }
- while (count <= 20);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement