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

📄 differential.cpp

📁 四种方法求积分:runge-kutta法
💻 CPP
字号:
#include "iostream.h"
#include "euler.h"
#include "hieuler.h"
#include "runge-kutta.h"
#include "adamsbashforth.h"
#include "ab4-am4.h"
#include "hiab4-am4.h"

main()
{
	float x, y, xend, h;
	cout << "input x, y, xend and h\n";
	cin >> x;
	cin >> y;
	cin >> xend;
	cin >> h;
	euler(h, x, y, xend);

	cout << "comput by improved euler method" << endl;
	hieuler(h, x, y, xend);

	cout << "comput by conversional runge-kutta method" << endl;
	rungekutta(h, x, y, xend);
		
	cout << "comput by conversional adams-bashforth method" << endl;
	adamsbashforth(h, x, y, xend);

	cout << "comput by conversional ab4-am4 method" << endl;
	ab4am4(h, x, y, xend);

	cout << "comput by conversional hiab4-am4 method" << endl;
	hiab4am4(h, x, y, xend);

	return 0;
}

⌨️ 快捷键说明

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