作业要求:计算半径为5的圆的面积和周长并打印出来.(pi为3.14)面积:pirr; Perimeter(周长)
using System.Linq;
using System.Text;
using System;
using System.Text;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
int r = 5;
double pi = 3.14;
double s = pi * r * r;
double p = 2 * pi * r;
Console.WriteLine("圆的面积为{0},圆的周长为{1}", pi * r * r, 2 * pi * r);
Console.ReadKey();
}
}
}