sin,cos,tan
페이지 정보
본문
#include <math.h>
#include <stdio.h>
#include<conio.h>
void main( void )
{
double pi = 3.141592;
double x, y;
x = pi / 180;
y = sin( 45*x ); //45도
printf( "sin( %f ) = %f\n", x, y );
y = cos( 45*x );
printf( "cos( %f ) = %f\n", x, y );
y = tan( 45*x );
printf( "tan( %f ) = %f\n", x, y );
getch();
}
#include <stdio.h>
#include<conio.h>
void main( void )
{
double pi = 3.141592;
double x, y;
x = pi / 180;
y = sin( 45*x ); //45도
printf( "sin( %f ) = %f\n", x, y );
y = cos( 45*x );
printf( "cos( %f ) = %f\n", x, y );
y = tan( 45*x );
printf( "tan( %f ) = %f\n", x, y );
getch();
}
댓글목록
등록된 댓글이 없습니다.