Advertisement
Spocoman

06. Calculate Rectangle Area

Jan 24th, 2022
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.50 KB | None | 0 0
  1. using System;
  2.  
  3. namespace CalculateRectangleArea
  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.  
  12.             double area = GetRectangleArea(width, height);
  13.             Console.WriteLine(area);
  14.         }
  15.  
  16.         static double GetRectangleArea(double width, double height)
  17.         {
  18.             return width * height;
  19.         }
  20.     }
  21. }
  22.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement