Hi here is the problem when my program tries to convert Fahrenheit to Celsius it gives an answer of zero regardless of what degree you put in. Any help in solving this is much appreciated.
Code:
#include <iostream> using namespace std; int main (void) { double inch_feet, inch_yard, inch_cent, inch_meter, fahrenheit; double inch_cv_feet; double inch_cv_yard; double inch_cv_cent; double inch_cv_meter; double Celsius; cout.setf(ios::fixed); cout.setf(ios::showpoint); cout.precision(2); <snipped> cout << " Please enter temperature in Fahrenheit to convert to Celsius: "; cin >> fahrenheit; Celsius = (100/180) * (fahrenheit - 32); cout << " Conversion from Fahrenheit to Celsius is: " << Celsius << endl; cout << " \nThank you for using this program.\n"; return 0; }
Comment