⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 example1-9.cpp

📁 关于书籍《Borland c++Builder工程实践》的源代码
💻 CPP
字号:
#include <iostream.h>
#include <math.h>
void function1(int ,double &,double&,double&);
double sin(),cos(),tan();
void main()
{
int x;
cout<<"Please enter a angle(<90):";
cin>>x;
double sinx,cosx,tanx;
if(x<0||x>=90)
cout<<"You enter a error number ";
else
function1( x, sinx, cosx, tanx);
cout<<"The sin(x)="<<sinx<<endl;
cout<<"The cos(x)="<<cosx<<endl;
cout<<"The tan(x)="<<tanx<<endl;
}
void function1(int x,double &sinx,double &cosx,double &tanx)
{
double  y=3.1415/180*x;
sinx=sin(y);
cosx=cos(y);
tanx=tan(y);
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -