Friday, 1 June 2012

UVa 11984 A Change in Thermal Unit Solution

//accepted

#include<iostream>
#include<iomanip>

using namespace std;

int main()
{
    int T,i=0;
    float c,f,C;
    cin>>T;
    while(T--)
    {
        cin>>c>>f;
        C=((5.0/9.0)*f)+c;

        cout<<"Case "<<++i<<": "<<fixed<<setprecision(2)<<C<<endl;
//        printf("Case %d: %f\n",++i,C);

    }

    return 0;
}

No comments:

Post a Comment