Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace Cookie_factory
- {
- class Program
- {
- static void Main(string[] args)
- {
- int Partida = int.Parse(Console.ReadLine());
- for (int i = 1; i <= Partida; i++)
- {
- int sugar = 0;
- int flour = 0;
- int eggs = 0;
- while (!(flour > 0 && eggs > 0 && sugar > 0))
- {
- string Comand = Console.ReadLine();
- while (Comand != "Bake!")
- {
- switch (Comand)
- {
- case "flour":
- flour++;
- break;
- case "eggs":
- eggs++;
- break;
- case "sugar":
- sugar++;
- break;
- default:
- break;
- }
- Comand = Console.ReadLine();
- }
- if (!(flour > 0 && eggs > 0 && sugar > 0))
- {
- Console.WriteLine("The batter should contain flour, eggs and sugar!");
- }
- }
- Console.WriteLine($"Baking batch number {i}...");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment