program decay implicit none real time, tau, number, dt open(12,file='decay.dat') tau = 5.0 dt = 1.0 number = 100.0 do time = dt, tau, dt number = number * (1.0 - dt/tau) write(12,*) time, number enddo close(12) end