Thursday, January 28, 2016

UVa 11984 A Change in Thermal Unit

#include<bits/stdc++.h>
using namespace std;
int main()
{
    float t , c , f, total=0;
    int counter=1;
    cin>>t;
    while(t--){
        cin>>c;
        cin>>f;
        total=((5.0/9.0)*f)+c;
       printf("Case %d: %.2f\n",counter,total);
       counter++;
    }
    return 0;
}

No comments:

Post a Comment