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 _07.Rectangle_Area
- {
- class Rectangle_Area
- {
- static void Main(string[] args)
- {
- double x1 = double.Parse(Console.ReadLine());
- double y1 = double.Parse(Console.ReadLine());
- double x2 = double.Parse(Console.ReadLine());
- double y2 = double.Parse(Console.ReadLine());
- Console.WriteLine("{0:F4}",Math.Abs(x1-x2) * Math.Abs(y1-y2));
- Console.WriteLine(2*(Math.Abs(x1 - x2) + Math.Abs(y1 - y2)));
- }
- }
- }
Add Comment
Please, Sign In to add comment