Guest User

Untitled

a guest
May 22nd, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.34 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <math.h>
  3. int main (void)
  4. { float w,b,y;
  5.   int n;
  6.   printf ("Sinustabelle:\n");
  7.   for (w = 0; w<=360;w += 5)
  8.       { b = (w/360)*2*M_PI;
  9.         y = sin(b);
  10.         n = 25 + (int)(25*y + 0.5);
  11.           printf ("%5.1f = %5.3f sin: %+5.3f",w,b,y);
  12.         for (int z = 0; z <= n; z++) printf (" ");
  13.         printf ("*\n");
  14.   }
  15. }
Add Comment
Please, Sign In to add comment