Bugfix for a spin caused by setting the value of fahr inside the for loop when it is now initialized at loop start.

This commit is contained in:
Reina Harrington-Affine 2025-07-29 17:00:35 -07:00
parent 61e32d0e22
commit fc658ddb69
2 changed files with 1 additions and 2 deletions

View file

@ -13,8 +13,7 @@ int main(){
printf("%4s\t%6s\n", "DegF", "DegC");
for (float fahr = lower; fahr <=300; fahr = fahr + step){
fahr = lower;
printf("%4.0f\t%6.1f\n", fahr, (5.0/9.0)*(fahr-32));
printf("%4.0f\t%6.1f\n", fahr, (5.0/9.0)*(fahr-32));
}
return 0;
}