Advertisement
Guest User

Untitled

a guest
Mar 21st, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.64 KB | None | 0 0
  1. using System;
  2. namespace exerciseSecondL{
  3.     class exerciseSecondL{
  4.       static void Main(){
  5.             double x1 = double.Parse(Console.ReadLine());
  6.             double y1 = double.Parse(Console.ReadLine());
  7.             double x2 = double.Parse(Console.ReadLine());
  8.             double y2 = double.Parse(Console.ReadLine());
  9.  
  10.             double width = Math.Abs(x2 - x1);
  11.             double height = Math.Abs(y2 - y1);
  12.  
  13.             double areaPlane = width * height ;
  14.             double perimeterPlane = 2*(width+height);
  15.             System.Console.WriteLine(areaPlane);
  16.             System.Console.WriteLine(perimeterPlane);
  17.       }
  18.     }
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement