Convert celsius to farenheit in C++

#include <iostream>
using namespace std;
 
int main() {
     double ctemp;   // Celsius temperature
     double ftemp;   // Fahrenheit temperature
     cout << "Input a Celsius temp and press ENTER: ";
     cin >> ctemp;
     ftemp = (ctemp * 1.8) + 32;
     cout << "Fahrenheit temp is: " << ftemp << endl;
 
     return 0;
}

Enjoyed this post? Share it!

 

Leave a comment

Your email address will not be published.