2014年3月9日 星期日

UVA 11984 C++

#include <iostream>
#include <iomanip>
using namespace std;
int main()
{
long long t ;
double c, d, f;
while (cin >> t)
{
for (int i = 0; i <= t - 1; i++)
{
cin >> c;
cin >> d;
c = (c * 9 / 5 )+ 32;
f = c+d;
f = 1.0*(f - 32) * 5 / 9;
cout <<"Case "<<i+1<<": "<<fixed<<setprecision(2)<< f << endl;
}
}
}

很無聊的一題,不過setprecision倒是滿實用的

沒有留言:

張貼留言