Fahrenheit to celcius conversion

#include
using namespace std;
int main() {
float min_value;
float max_value;

cin>>min_value>>max_value;

int step;
cin>>step;

int c;
float f = 0;
while(f<=max_value)
{
	c = (5*(f-32))/9;
	cout<<f<<" "<<c<<endl;
	step+=20;
}
return 0;

} this is the code ,it is getting compiled and providing the result also,but the testcases are not getting passes.

@ankita_10hey ,apko typecasting krni pdegi float me c=(float) baki sab as it is likh dena ,chl jayenge test cases.

okay, so c should be float , and rest of the code is correct?

@ankita_10 yes its correct.

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.

https://online.codingblocks.com/app/player/57856/content/97141/4792/code-challenge …can you tell me why is it showing tle

thats the link for the code

#include<bits/stdc++.h> using namespace std; int main() { float min_value; float max_value; cin>>min_value>>max_value; int step; cin>>step; int c; float f = 0; while(f<=max_value) { c = (5*(f-32))/9; cout<<f<<" "<<c<<endl; step+=20; } return 0; }

#include<bits/stdc++.h> using namespace std; int main() { float min_value; float max_value; cin>>min_value>>max_value; int step; cin>>step; float c; float f = 0; while(f<=max_value) { c = (5*(f-32))/9; cout<<f<<" "<<c<<endl; step+=20; } return 0; }

@ankita_10 What is the problem that you are facing?

it’s giving time limit exceeded as the error

Can you send me your complete code in the ide.