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

📄 d11r1.cpp

📁 Visual C++ 常用数值算法集 源代码
💻 CPP
字号:
#include "iostream.h"
#include "math.h"

double func(double x)
{
    return bessj0(x);
}

void main()
{
    //program d11r1
    //driver for routine mnbrak
	double ax,bx,cx,fa,fb,fc;
	cout.setf(ios::fixed);
	cout.precision(6);
    for (int i = 1; i<=10; i++)
	{
        ax = i * 0.5;
        bx = (i + 1) * 0.5;
        mnbrak(ax, bx, cx, fa, fb, fc);
        cout<<"        a           b            c"<<endl;
        cout<<"x";
		cout.width(12);        cout<<ax;
		cout.width(12);        cout<<bx;
		cout.width(12);        cout<<cx<<endl;
        cout<<"f";	   
		cout.width(12);        cout<<fa;
		cout.width(12);        cout<<fb;
		cout.width(12);        cout<<fc;
		cout<<endl;
    }
} 

⌨️ 快捷键说明

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