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 Demo
- {
- class Program
- {
- static void Main(string[] args)
- {
- var input = Console.ReadLine();
- var ingredientCount = 0;
- while(input != "Bake!")
- {
- var ingredient = input;
- ingredientCount++;
- Console.WriteLine($"Adding ingredient {ingredient}.");
- input = Console.ReadLine();
- }
- Console.WriteLine($"Preparing cake with {ingredientCount} ingredients.")
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement