C++/summary
사인, 코사인, 할때 입력값은 라디안이다!!
gandus
2010. 4. 8. 12:35
#include <iostream>
#include<cmath>
using namespace std;
void main ()
{
int i;
const double PI = 3.14;
for (i=1; i<= 180; i++)
{
cout<<i<<"의 사인값 : " << sin(PI * i /180) <<" 코 사인값 : "<< cos(PI * i / 180)<<endl;
/// (PI * i /180) 가 라디안 값이다 !!
}
}