using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace _10._25
{
class Program
{
static void Main(string[] args)
{
/**
* 计算半径为5的圆的面积和周长并打印出来.(pi为3.14)
* 面积:pi*r*r; Perimeter(周长)
* */
int r=5;
double pi = 3.14;
double S = pi * r * r;
double perimeter = 2 * pi * r;
Console.WriteLine("圆的面积为:{0},圆的周长为:{1}", S, perimeter);
Console.ReadKey();
}
}
网友评论