Професионална програма
Loading...
+ Нов въпрос
krasizorbov avatar krasizorbov 548 Точки
Best Answer

Здравей,

Това би трябвало да работи 100/100

            int firstEmployee = int.Parse(Console.ReadLine());
            int secondEmployee = int.Parse(Console.ReadLine());
            int thirdEmployee = int.Parse(Console.ReadLine());
            int peopleCount = int.Parse(Console.ReadLine());

            int peoplePerHour = firstEmployee + secondEmployee + thirdEmployee;
            int hours = 0;
            while (peopleCount > 0)
            {
                hours++;
                if (hours % 4 == 0)
                {
                    continue;
                }
                peopleCount -= peoplePerHour;
            }
            Console.WriteLine($"Time needed: {hours}h.");

0
n.dimitrova avatar n.dimitrova -1 Точки

Да, работи. Благодаря за отговора! 

1
galinncho avatar galinncho 1 Точки

И аз Благодаря !!!

 

0