Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace ConsoleApp8
- {
- class Program
- {
- static void Main(string[] args)
- {
- int ingreediantCounter = 0;
- string ingreediant;
- while (true)
- {
- ingreediant = Console.ReadLine();
- if (ingreediant == "Bake") { Console.WriteLine($"Preparing cake with {ingreediantCounter} ingredients."); break; }
- else
- {
- ingreediantCounter++;
- Console.WriteLine($"Adding ingredient {ingreediant}.");
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement