saimun1

[EXAM PREP] Bricks

Jul 23rd, 2017
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.39 KB | None | 0 0
  1. using System;
  2. class Program
  3. {
  4.     static void Main()
  5.     {
  6.         int x = int.Parse(Console.ReadLine());
  7.         int w = int.Parse(Console.ReadLine());
  8.         int m = int.Parse(Console.ReadLine());
  9.         int bricksInCourse =   (m * w);
  10.         double totalCourses = Math.Ceiling((double)x / bricksInCourse);
  11.         Console.WriteLine(totalCourses);
  12.         Console.ReadLine();
  13.     }
  14. }
Advertisement
Add Comment
Please, Sign In to add comment