1051. Biker's Trip Odomete

来源:互联网 发布:surface软件推荐 编辑:程序博客网 时间:2024/06/06 01:17

这里写图片描述这里写图片描述
这里写图片描述

// 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++;    }}                                 
原创粉丝点击