Вложени цикли - Въпрос към фабрика за сладки
Здравейте,
Въпроса ми е към задачата в следната лекция: https://softuni.bg/trainings/resources/officedocument/35368/presentation-programming-basics-with-csharp-september-2018/2073
(за джъдж: https://judge.softuni.bg/Contests/Practice/Index/1016#7 ).
Получавам 90/100 поради run-time error.
Може ли информация, защо го дава този error?
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace AdvancedCyclesTraining
{
    class Program
    {
        static void Main(string[] args)
        {
            int batchNum = int.Parse(Console.ReadLine());
            string ingredients;
            string all = null;
            for (int currentBatch = 1; currentBatch <= batchNum;)
            {
                ingredients = Console.ReadLine();
                while(ingredients != "Bake!")
                {
                    all += ingredients;
                    ingredients = Console.ReadLine();
                    
                }
                if(all.Contains("sugar") == true && all.Contains("eggs") == true && all.Contains("flour") == true)
                {
                    Console.WriteLine("Baking batch number " + currentBatch +"...");
                    all = null;
                    currentBatch++;
                }
                else
                {
                    Console.WriteLine("The batter should contain flour, eggs and sugar!");
                }
}
        }
    }
}