C# Program to Calculate the Area of a Rectangle

In this C# program, we will take input (Length and Width) from the user and calculate the area of a Rectangle. Formula to calculate area of Rectangle is A= Length*Width.

C# Program to Calculate the Area of a Rectangle Code:

  private static void Main(string[] args)
        {
            double Length, Width;
            Console.Write("Enter Length of Rectangle: ");
            Length = Convert.ToDouble(Console.ReadLine());
            Console.Write("Enter Width of Rectangle: ");
            Width = Convert.ToDouble(Console.ReadLine());
            double area = Length * Width;
            Console.WriteLine("Area of Rectangle is : {0}", area);
            Console.ReadLine();
        }	

C# Program to Calculate the Area of a Rectangle Output:

C#-Program-to-Calculate-the-Area-of-a-Rectangle

 
We are nothing without our users ! You can help us offer even more high quality content. Please share our page !
Best quality Asp .Net Ajax Control Toolkit tutorials.

Give your valuable comments.

Name
Email
Comment
8 + 4 =
 
About Us | Terms of Use | Privacy Policy | Disclaimer | Contact Us Copyright © 2012-2022 CodingFusion
75 Important SQL Server queries you should know