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>
main()
/* 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*/
fahr=lowest;
while (fahr<=300);
{
celcius= 5 * (fahr-32)/9;
printf("%3d %6d\n", fahr, celcius);
fahr=fahr+step;
}
}
im using an online compiler this one https://www.tutorialspoint.com/compile_c_online.php
(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 thanks in advance for the help