라벨이 math.h인 게시물 표시

C 언어: sin 함수, cos 함수, tan 함수

C언어: 삼각함수 /// 헤더파일 #include <math.h> /// 함수원형 double sin (double x); double cos (double x); double tan (double x); /// 인자 double x: 실수형 값(호도값) /// 반환값 성공시 반환값(return value): 계산값 /// 참고파일 헤더파일: math.h(연결) 소스파일: s_sin.c(연결) with cos() 소스파일: s_tan.c(연결) reference https://man7.org/linux/man-pages/man3/sin.3.html https://man7.org/linux/man-pages/man3/cos.3.html https://man7.org/linux/man-pages/man3/tan.3.html /// 예제 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 #include   < stdio.h > #include   < math.h >   #define  PI   3. 14 //#define PI 3.141 //#define PI 3.1415 //#define PI 3.14159 //#define PI 3.141592 //#define PI 3.1415926 //#define PI 3.14159265 //#define PI 3.141592653 //#define PI 3.1415926535   void  precision( int  value,  double  number);  // 사용자 정의 함수로 value정수 크기만큼 소수점의 개수를 조절   int