有人可以帮助我理解为什么这会给出0的输出?
#include <iostream>
using namespace std;
int main() {
float celsius;
float fahrenheit;
cout << "Enter Celsius temperature: ";
cin >> celsius;
fahrenheit = (5/9) * (celsius + 32);
cout << "Fahrenheit = " << fahrenheit << endl;
return 0;
}
Run Code Online (Sandbox Code Playgroud) c++ ×1