Find the Problem

#include
using namespace std;

int main() {

int startingF , endingF , gap;
cin>>startingF;
cin>>endingF;
cin>>gap;
int i=startingF;
while(i<=endingF)
{
	int cel = (i-32)*(0.55);
	cout<< i <<" "<< cel <<endl;
	i=i+gap;
}

return 0;

}

I don’t know why this code is not passing any testcases because its working fine when i am trying with Custom input. Please help!

Hey @Ekansh_14
Since 5/9 !=0.55 exactly hence use this

int cel = (i-32)*(5.0/9);

Otherwise might give WA for some cases

If your doubt is resolved then please mark it as resolved :slight_smile:

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.