?? d3r4.cpp
字號:
#include "iostream.h"
#include "math.h"
double func(double x)
{
return pow(x, 2) * (pow(x,2) - 2.0) * sin(x);
}
double fint(double x)
{
//integral of func
double aaa;
aaa = 4.0 * x * (pow(x,2) - 7.0) * sin(x);
return aaa - (pow(x , 4) - 14.0 * pow(x , 2) + 28.0) * cos(x);
}
void main()
{
//program d3r4
//driver for routine qromb
double pio2 = 1.5707963;
double s,b,a = 0.0;
b = pio2;
cout<<endl;
cout<<"integral of func with qromb"<<endl;
cout<<endl;
cout<<"actual value of integral is:";
cout<<(fint(b) - fint(a))<<endl;
cout<<endl;
qromb(a, b, s);
cout<<"result from routine qromb is:";
cout<<s<<endl;
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -