C++ examples for Data Type:double
Convert Celsius to Fahrenheit using double type
#include <iostream> using namespace std; int main()//from w w w . java 2s. c o m { double ctemp, ftemp; cout << "Input a Celsius temp and press ENTER: "; cin >> ctemp; ftemp = (ctemp * 1.8) + 32; cout << "Fahrenheit temp is: " << ftemp; return 0; }