Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <bits/stdc++.h>
- using namespace std;
- float a,b;
- float f(float x)
- {
- return x*x-sin(x);
- }
- int main()
- {
- int j=0;
- float integrala=0;
- cin>>a>>b;
- dif=a-b;
- for(j=1; j<=10000; j++)
- integrala=integrala+f((float)(((b-a)j)/20000)(float)((b-a)/10000));
- cout<<integrala;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement