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