Advertisement
Fundamentalen

CirclePerimeterAndArea

Mar 16th, 2014
245
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.40 KB | None | 0 0
  1. using System;
  2.  
  3. class CirclePerimeterAndArea
  4. {
  5.     static void Main()
  6.     {
  7.         Console.Write("Radius: ");
  8.         double radius = double.Parse(Console.ReadLine());
  9.  
  10.         double perimeter = ((2 * Math.PI) * radius);
  11.         double area = Math.PI * (radius * radius);
  12.  
  13.         Console.WriteLine("Perimeter = {0:F2}", perimeter);
  14.         Console.WriteLine("Area = {0:F2}", area);
  15.     }
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement