Saturday, April 24, 2021

Area of the Circle in C#

 I wrote this simple program to ask the user to give radius of the circle and then program will compute the area of the circle using C# programming language.

I am currently accepting programming work, IT projects, school and application development, programming projects, thesis and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me at the following email address for further details.  If you want to advertise on my website kindly contact me also in my email address also. Thank you.

My email address is jakerpomperada@gmail.com and jakerpomperada@yahoo.com








Program Listing


Program.cs

using System;


namespace Area_of_Circle

{

    class Program

    {

        // Area of the circle in C#

        // Jake Rodriguez Pomperada,MAED-IT, MIT

        // www.jakerpomperada.com  

        // www.jakerpomperada.blogspot.com

        // jakerpomperada@gmail.com

        // Bacolod City, Negros Occidental Philippines

        static void Main(string[] args)

        {

            double radius, area;

            Console.WriteLine("\n\n");

            Console.WriteLine("\tArea of the Circle in C#");

            Console.WriteLine("\n");

            Console.Write("\tEnter Radius: ");

            radius = Convert.ToDouble(Console.ReadLine());

            area = Math.PI * radius * radius;

            Console.WriteLine("\n");

            Console.WriteLine("\tArea of circle: {0:0.##} " , area);

            Console.WriteLine("\n");

            Console.WriteLine("\tEnd of Program");

            Console.ReadKey();

        }

    }

}


No comments:

Post a Comment