Click Here to see the problem detail.
Solution
f1-32=(9/5)c1
f2-32=(9/5)c2
for increase, f1-f2=(9/5)(c-c2)
Source Code
#include<stdio.h> double increase(int d) { double c=(double)5*d/9; return c; } int main() { int tc,f,c,i=1; double result; scanf("%d",&tc); while(tc--) { scanf("%d%d",&c,&f); result=(double)c+increase(f); printf("Case %d: %.2lf\n",i,result); i++; } return 0; }
Next Previous