C# program to find Area of Rectangle
Program
using System;
namespace AreaOfRectangle
{
class Program
{
static void Main(string[] args)
{
float length, breadth, area;
Console.Write("Enter the length of the rectangle:\t");
length = float.Parse(Console.ReadLine());
Console.Write("Enter the breadth of the rectangle:\t");
breadth = float.Parse(Console.ReadLine());
area = length * breadth;
Console.WriteLine("Area of Rectangle is:\t" + area);
}
}
}
Output
Enter the length of the rectangle: 50
Enter the breadth of the rectangle: 30
Area of Rectangle is: 1500