Advertisement
luizaspan

sinx 0-90

Apr 30th, 2015
344
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.28 KB | None | 0 0
  1. // Calcular sin(x) com x indo de 0 a 90 graus de 5 em 5 graus, num intervalo correspondente a 1/4 de periodo.
  2.  
  3. #include <stdio.h>
  4. #include <math.h>
  5. #define pi M_PI
  6.  
  7. int main(void)
  8. {
  9.   int x;
  10.  
  11.   for (x+0; x<=90; x+=5)
  12.     printf("%d\t %lf\n",x,sin(x*pi/180));
  13.  
  14.   return 0;
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement