3_26.cpp
来自「c++案例教程源代码」· C++ 代码 · 共 18 行
CPP
18 行
#include<iostream>
#include<cmath>
using namespace std;
#define PI 3.14159
void main(void)
{ double x, y; x = PI / 2;
y = sin( x ); cout<< "sin("<< x<<" ) = "<< y<<endl;
y = sinh( x ); cout<< "sinh("<< x<<" ) = "<< y<<endl;
y = cos( x ); cout<< "cos("<< x<<" ) = "<< y<<endl;
y = cosh( x ); cout<< "cosh("<< x<<" ) = "<< y<<endl;
y = asin( x ); cout<< "Arcsine of "<<x<<" = "<< y<<endl;
y = acos( x ); cout<< "Arccosine of "<<x<<" = "<< y<<endl;
y = tan( x ); cout<< "tan("<< x<<" ) = "<< y<<endl;
y = tanh( x ); cout<< "tanh("<< x<<" ) = "<< y<<endl;
y = atan( x ); cout<< "Arctangent of "<<x<<" = "<< y<<endl;
double z; z = atan2( x, y ); cout<<"Arctangent of "<<x<<" / "<<y<<": "<<z<<endl;
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?