Your classmate is programming under DOS, obviously you don’t … conio.h
comes with Turbo C and DOS … So, remove the lines
#include<conio.h>
and
clrscr();
and
getch();
to make your program compile …
… and do not use %.1f
to print an int.
… and main()
must return int
* and do not copy from your classmate … he seems to be stuck in the stone age*