using System; namespace Area { class NumberManipulator { public double CircArea(double radius) { double PI = 3.14; Area = PI * radius*radius; return Area; } static void Main(string[] args) { Console.WriteLine("Input the radius of the circle : "); r = Convert.ToDouble(Console.ReadLine()); int ret; NumberManipulator n = new NumberManipulator(); //calling the CircArea method ret = n.CircArea(r); Console.WriteLine("Area is : {0}", ret ); } } }
Hope this helps.Comment for any queries.
Please upvote if this helps.
Happy Learning!
Get Answers For Free
Most questions answered within 1 hours.