Help with this code

im absolutelyy newwww very very new to the world of coding im currently studying the book c programing language 2nd edition by by Brian Kernighan and im having trouble with the second code im practising with

#include <stdio.h>
/* create a program using arithmetic expresions to make a table where fahrenheit are converted to celcius and where
the top value is 300, lowest value 0 and its values between are spaced at 20 */
int fahr, celcius;
int lowest, upper, step;

	 lowest=0; /* this is te lowest value */
	 upper=300; /* the limit of the table */
	 step=20; /* step size betwen values  in lower and upper*/
	 while (fahr<=300); 
	 celcius= 5 * (fahr-32)/9;
	 printf("%3d %6d\n", fahr, celcius);

im using an online compiler this one
(planing on using NetBeans IDE 8.2 when i learn how to navigate between all its menus)
and the result i get is this one *$gcc -o main .c $main i have read the book again and again but i dont see a problem with main in other web pages it says i need to declare main as an int but that dosent work either :frowning: thanks in advance for the help

You have a semicolon in front of your while loop. The message is just a warning, but you can add a return type if you want.

ooh it was that thank you so much for your help!! :), return type? I will look for that in Google after work, thanks again

The book was written before the removal of the “implicit int” rule from the standard.

int main() {...} explicitly specify the function return type as an int.

wow this information is more than I asked for and very good to know thanks, I will write the code a few more times make tweeks here and there to see what happens