#include<stdio.h>
#include<math.h>
float f(float x, float y)
{
return (x+y);
}
void main()
{
float x0,y0,h,x,m,m1,m2,m3,m4;
printf("Enter x0, y0, h , x : ");
scanf("%f%f%f%f",&x0,&y0,&h,&x);
while(x0<x)
{
y0+=h*f(x0,y0);
x0+=h;
printf("x = %2.4f \t\t y = %2.4f\n",x0,y0);
}
}
0 comments:
Post a Comment