题目
计算半径为5的圆的面积和周长并打印出来。(pi=3.14)面积(pirr)perimeter(周长)、
代码
double pi = 3.14;
int r = 5;
double mianji, perimeter;
mianji = pi * r * r;
perimeter = 2 * pi * r;
Console.WriteLine("半径为5的圆,它的周长为{0},面积为{1}", perimeter, mianji);
Console.ReadKey();