Thursday, 16 March 2017

Geeksforgeeks Solution For " Celsius to Fahrenheit Conversion "

GeeksforGeeks Solution For School Domain .Below You Can Find The Solution Of Basic ,Easy ,Medium ,Hard .You Can Also Direct Submit Your Solution to Geeksforgeeks Same Problem .You Need to login then you can submit you answers 

Problem :- Given a temperature in Celsius, convert and print in Fahrenheit.

Submit Your Solution :- Click Here 


Solution :- 

#include <iostream>
#include <math.h>
using namespace std;
int main()
{
    int t;
    cin>>t;
    while(t--)
    {
       int f,c;
       cin>>c;
       f=(c*9/5) + 32;
       cout<<floor(f)<<endl;
    }
    return 0;
}

Output:-

Geeksforgeeks Solution For " Celsius to Fahrenheit Conversion "

No comments:
Write comments

Recommended Posts × +