Advertisement
Kamen_Mitev

Radius of circle

Nov 25th, 2012
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. using System;
  2.  
  3. class ProgramReadRadiusOfCircle
  4. {
  5. static void Main(string[] args)
  6. {
  7. Console.WriteLine("Plese enter positive number for circle's radius value =");
  8. double radius = double.Parse(Console.ReadLine());
  9. double pi=3.14156926;
  10. double perimeter = 2 * (pi * radius);
  11. double area = pi * (Math.Pow(radius, 2));
  12. Console.WriteLine("The perimeter of the circle is {0}", perimeter);
  13. Console.WriteLine("The area of the circle is {0}", area);
  14.  
  15. }
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement