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 _12.Rectangle_Properties
- {
- class Program
- {
- static void Main(string[] args)
- {
- // default float point value ми е настроeн на double
- double height = double.Parse(Console.ReadLine());
- double width = double.Parse(Console.ReadLine());
- var area = width * height;
- var perimeter = 2*(width + height) ;
- var 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