Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace _45555
- {
- class Program
- {
- protected static void Main(string[] args)
- {
- int BrPartidi = int.Parse(Console.ReadLine());
- for (int i = 1; i <= BrPartidi; i++)
- {
- bool FlourYes = false;
- bool EggsYes = false;
- bool SugarYes = false;
- string Product = Console.ReadLine();
- while (true)
- {
- if (Product == "flour")
- {
- FlourYes = true;
- }
- else if (Product == "eggs")
- {
- EggsYes = true;
- }
- else if (Product == "sugar")
- {
- SugarYes = true;
- }
- if (Product == "Bake!")
- {
- if (FlourYes && EggsYes && SugarYes)
- {
- break;
- }
- else
- {
- Console.WriteLine("The batter should contain flour, eggs and sugar!");
- }
- }
- Product = Console.ReadLine();
- }
- Console.WriteLine($"Baking batch number {i}...");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement