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