Advertisement
Xioth

C - TP3 - angles.c

Jan 27th, 2016
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.28 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <math.h>
  4.  
  5. int main(int argc, char *argv[])
  6. {
  7.     if(argc != 2)
  8.         exit(1);
  9.  
  10.     double c, s, t;
  11.     c = cos(atoi(argv[1]));
  12.     s = sin(atoi(argv[1]));
  13.     t = tan(atoi(argv[1]));
  14.  
  15.     printf("cos: %f\nsin: %f\ntan: %f", c, s, t);
  16.  
  17.     return 0;
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement