#include<stdio.h>
#include<math.h>
#define N (20000)
#define T (20.0)
#define h (T/(N-1))
double f(double t,double x);
int main()
{
int j;
double t,y,y_new;
y=1.0;
for(j=0;j<N;j++)
{
t=j*h;
y_new = y+h*f(t,y);
printf("%lf %lf\n",t,y);
y=y_new;
}
return 0;
}
double f(double t,double x)
{
return -x+3*exp(-t);
}