Advertisement
Guest User

Untitled

a guest
Jan 23rd, 2017
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 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 _2D_Rectangle_Area
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. var x1 = double.Parse(Console.ReadLine());
  14. var y1 = double.Parse(Console.ReadLine());
  15.  
  16. var area = x1 * y1;
  17.  
  18. var x2 = double.Parse(Console.ReadLine());
  19. var y2 = double.Parse(Console.ReadLine());
  20.  
  21. var perimeter = 2 * (x2 + y2);
  22.  
  23. Console.WriteLine(area);
  24. Console.WriteLine(perimeter);
  25. }
  26. }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement