Hey, I'm having trouble with this program. I'm trying to convert degrees F to degrees C with the conversion factor. But when I execute the program, degrees C always comes out to 0. Anyone have an idea as to what I'm doing wrong? Here's the program...
Code:#include <iostream> using namespace std; int main () { int F, C; cout << "Enter temperature in Fahrenheit: " << flush; cin >> F; cout << endl; static_cast<int>(C = (5/9)*(F - 32)); cout << "Current temperature = " << F << "F" << endl; cout << "Current temperature = " << C << "C" << endl; return 0; }