#include
using namespace std;
int main() {
int min,max,step;
cin>>min>>max>>step;
for(int i=0;i<=max;i++)
{
i=istep;
int C=5(i-32)/9;
cout<<i<<" "<<C<<endl;
}
return 0;
}
why my code not work?
Conversion (fahrenheit to celsius)
Hello @AjayRRJ,
You are iterating the loop over wrong range.
- i should start from min instead of 0.
- i should be incremented by step.
Hope, this would help.
Give a like, if you are satisfied.
1 Like