?? d10r2.cpp
字號:
#include <process.h>
#include <math.h>
#include <iomanip.h>
#include <iostream.h>
double fun(double x)
{
double t;
t=bessj0( x);
return t;
}
void main()
{
//program d10r2
//driver for routine zbrac
bool succes;
int i;
double x1,x2;
cout<<endl;
cout<<" bracketing values: function values:"<<endl;
cout<<endl;
cout<<" x1 x2 bessj0(x1) bessj0(x2)";
cout<<setprecision(2)<<setiosflags(ios::fixed);
for (i = 1; i<=10; i++)
{
x1 = double(i);
x2 = x1 + 1;
zbrac(x1, x2, succes);
if (succes)
{
cout<<setprecision(2)<<setw(8)<<x1;
cout<<setprecision(2)<<setw(8)<<x2;
cout<<setprecision(6)<<setw(14)<<bessj0(x1);
cout<<setprecision(6)<<setw(14)<<bessj0(x2);
}
}
cout<<endl;
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -