Advertisement
YavorJS

Bricks

Jun 26th, 2016
269
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace HelloCSharp
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13.  
  14. int bricks = int.Parse(Console.ReadLine());
  15. int workers = int.Parse(Console.ReadLine());
  16. int cartVolume = int.Parse(Console.ReadLine());
  17. int totalBricksPerCourse = workers*cartVolume;
  18. int totalBricksFromAllCourses=totalBricksPerCourse;
  19. int courses = 1;
  20. while (totalBricksFromAllCourses<bricks)
  21. {
  22. courses++;
  23. totalBricksFromAllCourses += totalBricksPerCourse;
  24. }
  25. Console.WriteLine(courses);
  26.  
  27. }
  28. }
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement