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