Advertisement
kmer

Untitled

Jan 23rd, 2020
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 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 numPeople = int.Parse(Console.ReadLine());
  10. int minPeople = int.Parse(Console.ReadLine());
  11. int counter = 0;
  12. int agent = 0;
  13. while (agent == 0)
  14. {
  15. numPeople -= minPeople;
  16. counter++;
  17. if (numPeople <= 0)
  18. {
  19. agent = 1;
  20. }
  21. }
  22. Console.WriteLine(counter);
  23. }
  24. }
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement