### Example: perimeter and area of a circle

Let us write a program that calculates a circle area and a perimeter by reading its radius r .

Formulas:

• Area = π * r * r
• Perimeter = 2 * π * r
• π ≈ 3.14159265358979323846…
Console.Write("Enter circle radius. r = ");
Console.WriteLine("Area = " + Math.PI * r * r);
// Math.PI - built in constant for π in C#
Console.WriteLine("Perimeter = " + 2 * Math.PI * r);


Let us test the program with radius r = 10: