namai
October 3rd, 2006, 04:25 PM
Hi, i have a problem with compiling c program.
There is a simple program code:
----------------------------------------------------------------
#include <math.h>
main()
{ int i;
printf("\t Number \t\t Square Root of Number\n\n");
for (i=0; i<=360; ++i)
printf("\t %d \t\t\t %d \n",i, sqrt((double) i));
}
----------------------------------------------------------------
..and here is a problem of compiling:
----------------------------------------------------------------
namai@namai-desktop:~/c$ cc prog.c
prog.c:1:18: error: math.h: No such file or directory
prog.c: In function ‘main’:
prog.c:7: warning: incompatible implicit declaration of built-in function ‘printf’
prog.c:10: warning: incompatible implicit declaration of built-in function ‘sqrt’
namai@namai-desktop:~/c$
---------------------------------------------------------------
I use daper 64. :-k
There is a simple program code:
----------------------------------------------------------------
#include <math.h>
main()
{ int i;
printf("\t Number \t\t Square Root of Number\n\n");
for (i=0; i<=360; ++i)
printf("\t %d \t\t\t %d \n",i, sqrt((double) i));
}
----------------------------------------------------------------
..and here is a problem of compiling:
----------------------------------------------------------------
namai@namai-desktop:~/c$ cc prog.c
prog.c:1:18: error: math.h: No such file or directory
prog.c: In function ‘main’:
prog.c:7: warning: incompatible implicit declaration of built-in function ‘printf’
prog.c:10: warning: incompatible implicit declaration of built-in function ‘sqrt’
namai@namai-desktop:~/c$
---------------------------------------------------------------
I use daper 64. :-k