C++ examples for Data Type:double
Convert Fahrenheit to celsius using double type
#include <iostream> using namespace std; int main()//from ww w . j a v a 2 s . c o m { double fahren, celsius; cout << "Enter a temperature in degrees Fahrenheit: "; cin >> fahren; celsius = (5.0/9.0) * (fahren - 32.0); cout << "The equivalent Celsius temperature is " << celsius << endl; return 0; }