Advertisement
Guest User

Untitled

a guest
Jun 27th, 2016
155
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. long totalBricksPerCourse = workers*cartVolume;
  18. long totalBricksFromAllCourses=0;
  19. int courses = 0;
  20.  
  21. while (totalBricksFromAllCourses<bricks)
  22. {
  23. courses++;
  24. totalBricksFromAllCourses += totalBricksPerCourse;
  25. }
  26. Console.WriteLine(courses);
  27.  
  28. }
  29. }
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement