Commit 64b9df4b authored by KTKadyshev's avatar KTKadyshev
Browse files

Upload New File

parent cf5fda18
#include <iostream>
#include <cmath>
using namespace std;
const double pi = 3.14;
long double f(long double x);
return sin(x)*cos(x)/(5 + x);
long double left(long double t0, long double tk,long double h,
long double (*func)(long double))
int n=ceil ((tk-t0)/h);
long double result =0.0;
for (int i=0;i<n-1;i++)
result +=func(t0+i*h);
return result;
int main()
cout<< left (0, pi, 0.0001,f)<< endl;
return 0;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment