Sunday, May 1, 2016

UVA problem 11984 - A Change in Thermal Unit

Problem link (Click here)

#include<cstdio>
#include <iostream>
using namespace std;
int main()
{
    int test_case, t = 0;
    float f,a,c,d;
    cin >> test_case;
    while(test_case--)
    {
        t++;
        cin >> c >> d;
        f = 9*c/5+d;
        a = f*5/9;
        printf("Case %d: %.2f\n",t,a);

    }
    return 0;
}

No comments:

Post a Comment