anizko

06. Calculate Rectangle Area

Jul 2nd, 2019
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.59 KB | None | 0 0
  1. using System;
  2.  
  3. namespace _06._Calculate_Rectangle_Area
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             double width = double.Parse(Console.ReadLine());
  10.             double height = double.Parse(Console.ReadLine());
  11.             double areaRectangle = CalculatesAreaRectangle(width, height);
  12.            
  13.             Console.WriteLine(areaRectangle);
  14.         }
  15.        
  16.         static double CalculatesAreaRectangle (double width, double height)
  17.         {
  18.             double area = width * height;
  19.             return area;
  20.         }
  21.  
  22.  
  23.     }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment