Advertisement
elena1234

SoftUniReception

Oct 12th, 2020 (edited)
179
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.01 KB | None | 0 0
  1. using System;
  2.  
  3. namespace SoftUniReception
  4. {
  5.     class MainClass
  6.     {
  7.         public static void Main(string[] args)
  8.         {
  9.             int firstEmployeeAbility = int.Parse(Console.ReadLine());
  10.             int secondEmployeeAbility = int.Parse(Console.ReadLine());
  11.             int thirdEmployeeAbility = int.Parse(Console.ReadLine());
  12.             int totalCountStudentsOnTheReception = int.Parse(Console.ReadLine());
  13.             int counterForHours = 0;
  14.             int totalHandleStudentsPerHour = firstEmployeeAbility + secondEmployeeAbility + thirdEmployeeAbility;
  15.  
  16.             while (totalCountStudentsOnTheReception > 0)
  17.             {
  18.                 counterForHours++;
  19.                 if (counterForHours % 4 == 0 && counterForHours!=0)
  20.                 {
  21.                     continue;
  22.                 }
  23.  
  24.                 totalCountStudentsOnTheReception -= totalHandleStudentsPerHour;
  25.             }
  26.  
  27.             Console.WriteLine($"Time needed: {counterForHours}h.");
  28.          }
  29.  
  30.        }
  31.     }
  32.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement