Код: Выделить всё
#include
#include
#include
using namespace std;
double func1(double x); //All the function I'll be integrating
double func2(double x);
double func3(double x);
double func4(double x);
double Simpson(double (*F)(double), double a, double b, int N); //a and b are the extremes of integration,
//N is the number of intervals and F is the function that will be integrated
int main() {
cout
Подробнее здесь: [url]https://stackoverflow.com/questions/79079774/cant-make-a-simpson-rule-algorithm-working-in-c-works-for-some-functions-and[/url]