圆柱体的表面积
Time Limit:1000MS Memory Limit:65536K
Total Submit:819 Accepted:233
Description
输入底边半径r和高h,输出圆柱体的表面积,保留三位小数。
Input
输入底边半径r和高h
Output
输出圆柱体的表面积,保留三位小数
Sample Input
3.5 9
Sample Output
Area=274.889
Source
刘汝佳语言入门
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace AK1094 {
class Program {
static void Main(string[] args) {
string[] sb = Console.ReadLine().Split();
double r = double.Parse(sb[0]), h = double.Parse(sb[1]);
double area = (2 * r * r + 2 * r * h) * Math.PI;
Console.Write("Area=");
Console.WriteLine(area.ToString("0.000"));
}
}
}