Conversion (fahrenhite to celsius) challenge doubt

#include
using namespace std;
int main() {
float a,b,c,ce;
cin>>a>>b>>c;
int i=a;
while(i<=b)
{
cout<<i;
ce=(5/9)(i-32);
cout<<" "<<ce<<endl;
i=i+c;
}
return 0;
}
sir, this program is giving wrong output, but if the change the formula of ce to (5
(i-32))/9, then the out put id correct… why is this so…

You have to output the farenheit and celius in integers, when you’re doing (5/9)(i-32) its considering it as integer and doing 0*(i-32), hence all the celcius temp are 0. If you want to still do it that way, then make data type of a,b,c,ce as int and do
ce=(int)((5.0/9)*(i-32))