Advertisement
AlexJC

Training Lab

Aug 27th, 2016
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.87 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace Aula
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. double w = double.Parse(Console.ReadLine());
  14. if (w < 3 || w >= 100)
  15. {
  16. Console.WriteLine("Invalid Number");
  17. }
  18. double h = double.Parse(Console.ReadLine());
  19. if (h <= 3 || h > 100)
  20. {
  21. Console.WriteLine("Invalid Number");
  22. }
  23. else if (h > w)
  24. {
  25. Console.WriteLine("Invalid Number");
  26. }
  27.  
  28. var row = Math.Floor(w / 1.2);
  29. var col = Math.Floor((h - 1) / 0.7);
  30. double seats = row * col - 3;
  31. Console.WriteLine(seats);
  32. }
  33. }
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement