Почему этот код C не работает должным образом в терминале, но нормально работает в Xcode?
int main () {
int farh, celcius;
int lower, upper, incr;
lower = 0; // The lowest fahrenheit tempeture allowed.
upper = 300; // Highest fahrenheit temperature allowed.
incr = 20; // The increments in which the fahrenheit increases until it reaches (upper)
printf("Thanks for using our converter!\n ");
farh = lower;
while (farh <= upper) {
celcius = 5 * (farh - 32) /9;
printf("%d\t%d\n", farh, celcius);
farh = farh + incr;
}
return 0;
}
Вывод:
