To find the area of a rectangle, multiply the length by the width.
The formula is:
A = L x W
where A is the area, L is the length, W is the width, and X means multiply
and the code is:
using System;
class AreaRectangle
{
static void Main()
{
//Rectangle Area: A (area) = L (length) x W (width)
Console.Write("Please write the length of your rectangle: ");
decimal lengthSide = decimal.Parse(Console.ReadLine());
Console.Write("Please write the width of your rectangle: ");
decimal widthSide = decimal.Parse(Console.ReadLine());
decimal area = lengthSide * widthSide;
Console.WriteLine("The area of your rectangle is: {0}", area);
}
}
