Advertisement
Guest User

Untitled

a guest
Feb 13th, 2013
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. root@ubuntu12:~# cat test.c
  2.  
  3.  
  4. #include <stdio.h>
  5. #include <math.h>
  6.  
  7. int main(void) {
  8.  
  9.  
  10. int x=0;
  11.  
  12. for (x=0 ; x <= 360; x++) {
  13.  
  14. printf("%2.5f\n", cos((double)x));
  15. }
  16.  
  17. return(0);
  18. }
  19. emag@ubuntu12:~# gcc -lm -o test test.c
  20. /tmp/ccNA1O2l.o: In function `main':
  21. test.c:(.text+0x1e): undefined reference to `cos'
  22. collect2: ld returned 1 exit status
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement