bullit3189

SoftUniReception-TF-Exam01Jul18

Jan 30th, 2019
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.94 KB | None | 0 0
  1. using System;
  2. using System.Linq;
  3. using System.Collections.Generic;
  4.  
  5. namespace _01SoftUniReception
  6. {
  7. class Program
  8. {
  9. static void Main(string[] args)
  10. {
  11. int efficiency1 = int.Parse(Console.ReadLine());
  12. int efficiency2 = int.Parse(Console.ReadLine());
  13. int efficiency3 = int.Parse(Console.ReadLine());
  14. int totalStudents = int.Parse(Console.ReadLine());
  15. int totalEfficiency = efficiency1 + efficiency2 + efficiency3;
  16.  
  17. int hours = 0;
  18.  
  19.  
  20. while (totalStudents>0)
  21. {
  22.  
  23. hours++;
  24.  
  25. if (hours%4==0)
  26. {
  27. continue;
  28. }
  29. else
  30. {
  31. totalStudents -= totalEfficiency;
  32. }
  33. }
  34. Console.WriteLine("Time needed: {0}h.",hours);
  35. }
  36. }
  37. }
Advertisement
Add Comment
Please, Sign In to add comment