mattnguyen

Untitled

Mar 15th, 2021
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. using System;
  2.  
  3. namespace ConsoleApp1
  4. {
  5. class Program
  6. {
  7. static void Main(string[] args)
  8. {
  9. double h = double.Parse(Console.ReadLine());
  10. double w = double.Parse(Console.ReadLine());
  11. double wInCm = w * 100;
  12. double hInCm = h * 100;
  13.  
  14. double withoutCorridor = wInCm - 100;
  15. double seats = Math.Round(withoutCorridor / 70);
  16. double rows = Math.Round(hInCm / 120);
  17. double totalSeats = (seats * rows) - 3;
  18.  
  19. Console.WriteLine(totalSeats);
  20.  
  21. }
  22. }
  23. }
  24.  
Advertisement
Add Comment
Please, Sign In to add comment