DEFDBL A-Z DEF fnf (t) = COS(t ^ 2) tinitial = 0 tfinal = 4 t = tinitial numberofsteps = 2 ^ 3 deltat = (tfinal - tinitial) / numberofsteps accumulation = 0 FOR k = 1 TO numberofsteps deltay = fnf(t) * deltat accumulation = accumulation + deltay t = t + deltat PRINT deltay, accumulation, t NEXT k