Advertisement
Babul_420

uva problem 11984 A Change in Thermal Unit solution

Apr 28th, 2018
335
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.29 KB | None | 0 0
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3. int main()
  4. {
  5.     int t;
  6.     float c,d;
  7.     float ans;
  8.     scanf("%d", &t);
  9.     for(int i=1;i<=t;i++){
  10.         scanf("%f%f", &c, &d);
  11.  
  12.  
  13.         ans=(5*d)/9;
  14.         ans=ans+c;
  15.         printf("Case %d: %0.2f\n",i,ans);
  16.     }
  17.     return 0;
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement