// Write a program to print the area of a circle. using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace areaofcircle { class Program { static void Main(string[] args) { int r; double a, p; p = 3.14; Console.WriteLine("Enter the value of radius"); r = Convert.ToInt32(Console.ReadLine()); a = p * r * r; Console.WriteLine("area" + a); Console.ReadLine(); } } }
No comments:
Post a Comment