Boris-Stavrev92

Untitled

Jun 7th, 2017
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace _12.Rectangle_Properties
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. // default float point value ми е настроeн на double
  14.  
  15. double height = double.Parse(Console.ReadLine());
  16. double width = double.Parse(Console.ReadLine());
  17.  
  18. var area = width * height;
  19. var perimeter = 2*(width + height) ;
  20. var diagonal = Math.Sqrt((width * width) + (height * height));
  21.  
  22. Console.WriteLine(perimeter);
  23. Console.WriteLine(area);
  24. Console.WriteLine(diagonal);
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31. }
  32. }
  33. }
Advertisement
Add Comment
Please, Sign In to add comment