Advertisement
Qrist

Calculate Rectangle Area

Apr 16th, 2020
186
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.39 KB | None | 0 0
  1. using System;
  2.  
  3. class Program
  4. {
  5.     public static void Main(string[] args)
  6.     {
  7.         double first = double.Parse(Console.ReadLine());
  8.         double second = double.Parse(Console.ReadLine());
  9.         double area=RectangleArea(first, second);
  10.         Console.WriteLine(area);
  11.    
  12.     }
  13.     public static double RectangleArea(double a,double b)
  14.     {
  15.         return a * b;
  16.     }    
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement