Advertisement
Spocoman

03. Elevator

Jan 18th, 2022 (edited)
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.37 KB | None | 0 0
  1. using System;
  2.  
  3. namespace Elevator
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             int persons = int.Parse(Console.ReadLine());
  10.             int capacity = int.Parse(Console.ReadLine());
  11.             int courses = (int)(Math.Ceiling((decimal)persons / capacity));
  12.  
  13.             Console.WriteLine(courses);
  14.         }
  15.     }
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement