#include"stdio.h"
void main()
{
float c,f;
printf("enter temp in centigrade: \n");
scanf("%f",&c);
f=(1.8*c)+32;
printf("temp in Fahrenheit=%f \n",f);
}
enter temp in centigrade:
-40
temp in Fahrenheit=-40.000000
Press any key to continue . . .
First understand the algorithm carefully. Then study the program line-by-line and compare it with the output. Finally, review the explanation section to strengthen your logic and programming understanding.
Rewrite the program without looking at the code. Modify values, conditions or logic and run it again. This helps improve confidence and strengthens coding skills much faster.