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 _2D_Rectangle_Area
- {
- class RectangularArea2D
- {
- static void Main(string[] args)
- {
- var x1 = double.Parse(Console.ReadLine());
- var y1 = double.Parse(Console.ReadLine());
- var x2 = double.Parse(Console.ReadLine());
- var y2 = double.Parse(Console.ReadLine());
- var a = Math.Abs(x1 - x2);
- var b = Math.Abs(y2 - y1);
- Console.WriteLine(a * b);
- Console.WriteLine(2 * (a + b));
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment