Advertisement
iliqnvidenov

Untitled

Nov 28th, 2014
259
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.43 KB | None | 0 0
  1. using System;
  2.  
  3.  class Circle
  4.  {
  5.      static void Main()
  6.      {
  7.          double pi = Math.PI, ar, p;
  8.          Console.Write("Enter the radius of the circle: ");
  9.          double r = double.Parse(Console.ReadLine());
  10.          p = (2*pi) * r;
  11.          ar = Math.Pow(r, 2) * pi;
  12.          Console.WriteLine("The perimeter of the circle is: {0:F2}", p);
  13.          Console.WriteLine("The area of the circle is: {0:F2}", ar);
  14.      }
  15.  }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement