Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace CakeIngredients
- {
- class cakeIngredients
- {
- static void Main(string[] args)
- {
- string ingr;
- for (int i = 0; i < 20; i++)
- {
- ingr = Console.ReadLine();
- if (ingr != "Bake!")
- {
- Console.WriteLine($"Adding ingredient {ingr}.");
- }
- else
- {
- Console.WriteLine($"Preparing cake with {i} ingredients.");
- break;
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement