Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- class Rectangles
- {
- static void Main()
- {
- Console.Write("Width = ");
- double width = double.Parse(Console.ReadLine());
- Console.Write("Height = ");
- double height = double.Parse(Console.ReadLine());
- double perimeter = (2 * width) + (2 * height);
- double area = width * height;
- Console.WriteLine("Perimeter of rectangle is " + perimeter);
- Console.WriteLine("Area of rectangle is " + area);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment