Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- class Circle
- {
- static void Main()
- {
- double pi = Math.PI, ar, p;
- Console.Write("Enter the radius of the circle: ");
- double r = double.Parse(Console.ReadLine());
- p = (2*pi) * r;
- ar = Math.Pow(r, 2) * pi;
- Console.WriteLine("The perimeter of the circle is: {0:F2}", p);
- Console.WriteLine("The area of the circle is: {0:F2}", ar);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement