aggressiveviking

02.Bricks

Mar 4th, 2020
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.46 KB | None | 0 0
  1. using System;
  2.  
  3. namespace _02.Bricks
  4. {
  5.     class Bricks
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             int x = int.Parse(Console.ReadLine());
  10.             int w = int.Parse(Console.ReadLine());
  11.             int m = int.Parse(Console.ReadLine());
  12.  
  13.             int bricksInOneCourse = w * m;
  14.  
  15.             double totalCourses = Math.Ceiling((double)x / bricksInOneCourse);
  16.  
  17.             Console.WriteLine(totalCourses);
  18.         }
  19.     }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment