Celsius to Fahrenheit C++
I just want to share this if you to lazy to convert Ctemp to Ftemp exp.
i was on school and they said how to convert Celsius to Fahrenheit so i went home and think lol xDDD
can u guys gave me a link for like a C++ question and quiz and stuff.
thanks
i was on school and they said how to convert Celsius to Fahrenheit so i went home and think lol xDDD
Code:
// I use Visual Studio 2008
#include <iostream>
using namespace std;
int main() {
double ctemp; // Celsius temperature
double ftemp; // Fahrenheit temperature
// Get value of ctemp (Celsius temp).
cout << "Input a Celsius temp and press ENTER: ";
cin >> ctemp;
// Calculate ftemp (Fahrenheit temp) and output.
ftemp = (ctemp * 1.8) + 32;
cout << "Fahrenheit temp is: " << ftemp << endl;
return 0;
}
thanks
