I don't understand why the following formula doesn't compute as it should.
F = (9/5) * C + 32
And when the "9/5" is replaced by 1.8, there aren't any issues and it correctly outputs like this:
Enter the temperature: 37
It is same as 98.6
But for (9/5) it shows:
Enter the temperature: 37
It is same as 69
Why is that??
Below is the code:
#include <iostream>
using namespace std;
int main() {
float Temp_C;
cout << "Enter the temperature: ";
cin >> Temp_C;
cout << "It is same as " << (((9/5) * Temp_C) + 32) << endl;
}