Write a program in C# to calculate the area and circumference of a circle.
Following is the simple C# code :
Output:-
Following is the simple C# code :
class Lab { static void Main(string[] args) { Console.Write("Enter Radius of circle : "); double radius = double.Parse(Console.ReadLine()); double perimeter = ((2 * Math.PI) * radius); Console.WriteLine("Perimeter Of Circle = {0:F2}", perimeter); Console.ReadLine(); } }
Output:-
No comments:
Post a comment