Code:
#include <stdio.h>
int main(void)
{
int fahr = 0, total = 0, step = 0;
printf("Fahrenheit ?: ");
scanf("%d", &fahr);
printf("Total ?: ");
scanf("%d", &total);
printf("Steps ?: ");
scanf("%d", &step);
for(fahr = fahr; fahr <= total; fahr+=step)
printf("Fahrenheit: %d\t Celsius %d\n", fahr, (fahr - 32) * 5/9);
}
If I simply do "int fahr, total, step;" then the code runs immediately but if I set them to 0 it takes ages until the first question comes up and Iam just curious why thats the case ?
Thanks in advance (inserted the text without formatting, hopefully thats correct this time, VisualStudioCode only has the option to "copy").