TI-81 Program for Trapezoidal Rule
 
 

Prgm :TRAP
:Disp "Enter interval endpoints & number of divisions"
:Disp "Enter left endpoint"
:Input A
:Disp "Enter right endpoint"
:Input B
:Disp "Enter number of divisions"
:Input N
:0 --> S
:(B - A)/N --> D
:A --> X
:Y1/2 --> K
:B --> X
:Y1/2 + K - -> K
:A --> X
:1 --> M
:Lbl 2
:X + D --> X
:Y1 + K --> K
:1 + M --> M
:If M < N
:Goto 2
:K * D --> K
:Disp "Approx is = "
:Disp K
:End