//naam to suna hi hoga #include<iostream> #include<math.h> using namespace std; float f(float x, float y) { float y1=0; y1=x+y; return y1; } int main() { float y, x, h, n, y1; cout<<"Enter the width of iteration:"<<endl; cin>>h; cout<<"Enter the initial X:"<<endl; cin>>x; cout<<"Enter the corresponding y value"<<endl; cin>>y; cout<<"Enter the final X:"<<endl; cin>>n; while( x<n) { y1=y+h*f(x,y); y+=h/2*(f(x,y)+f(x+h,y1)); x=x+h; } cout<<"Y("<<x<<") :"<<y<<endl; }