Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace P12_RectangleProperties
- {
- class Program
- {
- static void Main(string[] args)
- {
- double width = double.Parse(Console.ReadLine());
- double height = double.Parse(Console.ReadLine());
- double perimeter = 2 * (width + height);
- double area = width * height;
- double diagonal = Math.Sqrt(Math.Pow(width, 2) + Math.Pow(height, 2));
- Console.WriteLine(perimeter);
- Console.WriteLine(area);
- Console.WriteLine(diagonal);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement