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