Advertisement
Guest User

Untitled

a guest
Jan 20th, 2017
383
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.44 KB | None | 0 0
  1. using System;
  2. class Program
  3. {
  4.     static void Main()
  5.     {
  6.         var x1 = double.Parse(Console.ReadLine());
  7.         var y1 = double.Parse(Console.ReadLine());
  8.         var x2 = double.Parse(Console.ReadLine());
  9.         var y2 = double.Parse(Console.ReadLine());
  10.         var Area = 2 * (Math.Abs(x2 - x1) + Math.Abs(y1 - y2));
  11.         var x = Math.Abs(x2 - x1) * Math.Abs(y1 - y2);
  12.  
  13.         Console.WriteLine("{0}\n{1}", x, Area);
  14.     }
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement