- #include<iostream>
- #include<iomanip> //for setprecision()
- using namespace std;
- int main ()
- {
- int testCases ;
- float cel , incInFahr ; //for celsuis , and the increse in fahrenheit
- float fahrenheit;
- cin>>testCases;
- for(int i=0; i<testCases ; i++)
- {
- cin>>cel>>incInFahr;
- fahrenheit = (((cel * 9)/5)+32 ) ;
- fahrenheit +=incInFahr;
- cel = ((fahrenheit - 32) * 5/9);
- cout<<"Case "<<i+1<<": "<<fixed<<setprecision(2)<<cel<<endl;
- }
- return 0;
- }
You can find more of my solutions on Here
No comments:
Post a Comment