#include #include double func(double t, double x) { return (1.0-2*x); } void main() { double a, t, h, y0, yn; int i, n; n=16; a=0.0; h=1.0/16; t=0; y0=2; for (i=1;i<=n; i++) { yn=y0+h*func(t,y0); /* Printout the raw output */ printf("y(%f)=%10.7f\n", t+h, yn); y0=yn; t=t+h; } }