您的位置:首页 > 其它

1051. Biker's Trip Odomete

2017-09-10 15:37 337 查看






// Problem#: 1051
// Submission#: 3810653
// The source code is licensed under Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License
// URI: http://creativecommons.org/licenses/by-nc-sa/3.0/ // All Copyright reserved by Informatic Lab of Sun Yat-sen University
#include<iostream>
#include<iomanip>
using namespace std;
const double PI=3.1415927;

int main()
{
double d,time;
int r;
int i=1;
while(cin >> d >> r >> time&&r!=0)
{
double s;
s=d*PI*r/12/5280;
double v;
v=s/time*60*60;
cout << "Trip #" << i << ": " << fixed << setprecision(2) << s;
cout << " " << fixed << setprecision(2) << v << endl;
i++;
}
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: