Advertisement
gospod1978

Methods/Calculating Rectangle Area

Oct 11th, 2019
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.49 KB | None | 0 0
  1. using System;
  2. using System.Linq;
  3.  
  4. namespace Methods
  5. {
  6.     public class Methods
  7.     {
  8.         public static void Main()
  9.         {
  10.             double width = double.Parse(Console.ReadLine());
  11.  
  12.             double height = double.Parse(Console.ReadLine());
  13.  
  14.             double area = GetArea(width, height);
  15.  
  16.             Console.WriteLine(area);
  17.         }
  18.  
  19.         public static double GetArea(double width, double height)
  20.         {
  21.             return width * height;
  22.         }
  23.     }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement