Skip to content

Commit

Permalink
正弦和余弦
Browse files Browse the repository at this point in the history
  • Loading branch information
muscle committed Jul 29, 2015
1 parent 09f6bb0 commit 9a0280f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion 习题1-4.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ int main()
{
int n; //0<n<360
cin>>n;
cout<<sin(n*M_PI/180)<<endl; //M_PI不是真正的π,只是一个近似值,浮点数运算有误差
cout<<sin(n*M_PI/180)<<" "; //M_PI不是真正的π,只是一个近似值,浮点数运算有误差
cout<<cos(n*M_PI/180)<<endl;
return 0;
}
Expand Down

0 comments on commit 9a0280f

Please sign in to comment.