您的位置:首页 > 其它

zoj1813

2015-07-25 20:57 253 查看
简单题

#include <iostream>
#include <iomanip>
using namespace std;

int main()
{
int num = 0;
while(1)
{
num ++;
double diameter,time,revolutions,a,b;
cin >> diameter >> revolutions >> time;
if(revolutions == 0)
break;
a = revolutions * 3.1415927 * diameter/(12*5280);
b = a*3600/time;
cout << setiosflags(ios::fixed);
cout << "Trip #" << num << ": " << setprecision(2) << a << ' ' <<setprecision(2) << b << endl;
}
return 0;
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: