Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace Aula
- {
- class Program
- {
- static void Main(string[] args)
- {
- double w = double.Parse(Console.ReadLine());
- if (w < 3 || w >= 100)
- {
- Console.WriteLine("Invalid Number");
- }
- double h = double.Parse(Console.ReadLine());
- if (h <= 3 || h > 100)
- {
- Console.WriteLine("Invalid Number");
- }
- else if (h > w)
- {
- Console.WriteLine("Invalid Number");
- }
- var row = Math.Floor(w / 1.2);
- var col = Math.Floor((h - 1) / 0.7);
- double seats = row * col - 3;
- Console.WriteLine(seats);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement