Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- class Program
- {
- static void Main()
- {
- double x1 = double.Parse(Console.ReadLine());
- double y1 = double.Parse(Console.ReadLine());
- double x2 = double.Parse(Console.ReadLine());
- double y2 = double.Parse(Console.ReadLine());
- double width = Math.Max(x1, x2) - Math.Min(x1, x2);
- double height = Math.Max(y1, y2) - Math.Min(y1, y2);
- Console.WriteLine("Area = " + width * height);
- Console.WriteLine("Perimeter =" + 2 * (width + height));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement