Tisho_Todorov

04.Rectangles

Oct 12th, 2014
257
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.60 KB | None | 0 0
  1. using System;
  2.  
  3. class Rectangles
  4. {
  5.     static void Main()
  6.     {
  7.         Console.WriteLine("Please give us width and height of your Rectangle:");
  8.         double width = double.Parse(Console.ReadLine());
  9.         double height = double.Parse(Console.ReadLine());
  10.         double areaOfRectangle = (width * height);
  11.         Console.WriteLine("The area of your Rectangle is: {0}" ,areaOfRectangle);
  12.         double perimeterOfrectangle = 2*(width + height);
  13.         Console.WriteLine("The perimeter of your Rectangle is: {0}",perimeterOfrectangle);
  14.         Console.Title = "Created by T.Todorov";
  15.     }
  16. }
Advertisement
Add Comment
Please, Sign In to add comment