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 Problem_4_Rectangles
- {
- class Rectangles
- {
- static void Main()
- {
- Console.Write("Enter the weigh: ");
- double w = double.Parse(Console.ReadLine());
- Console.Write("Enter the height: ");
- double h = double.Parse(Console.ReadLine());
- double p = 2*w+2*h;
- double area = w*h;
- Console.WriteLine("| width | height | perimeter| area |");
- Console.WriteLine("|{0,10}|{1,10}|{2,10}|{3,10}|", w, h, p, area);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment