5 CLS
10 PRINT "      DEPRECIATION SCHEDULE-DECLINING BALANCE"
20 PRINT "THIS PROGRAM PRINTS A SCHEDULE FOR DEPRECIATING AN ASSET
30 PRINT"BY THE DECLINING BALANCE METHOD"
40 PRINT "INPUTS ARE ITEM COST,ESTIMATED SALVAGE VALUE & LIFE IN YEARS.
50 PRINT"OUTPUT IS A YEAR BY YEAR SCHEDULE OF CURRENT DEPRECIATION,
60 PRINT"ACCUMULATED DEPRECIATION AND BOOK VALUE.
90 INPUT " PRESS ENTER TO BEGIN";Z9
100 CLS
105 INPUT"DO YOU WANT OUTPUT ON LINEPRINTER(Y/N)";Z2$
106 IF Z2$<>"Y" AND Z2$<>"N" THEN GOTO 105
110 INPUT "ENTER  COST              ";C
120 INPUT "ENTER SALVAGE VALUE      ";S
130 INPUT "ENTER LIFE IN YEARS      ";L
135 INPUT "RATE OF DEPRECIATION(%)  ";RD
137 RD=RD/100
140 IF C >= S  GOTO 200
150 PRINT
160 PRINT"SALVAGE VALUE > COST  ---- ERROR-ERROR"
170 PRINT"ENTER DATA AGAIN."
180 FOR I= 1 TO 400:NEXT I
190 GOTO 100
200 CLS
210 GOSUB 1000:REM HEADING
220 GOSUB 1100:REM INITIALIZE
230 GOSUB 1200:REM COMPUTE & PRINT
250 END
1000 REM HEADING SUBROUTINE
1010 CLS
1015 IF Z2$="Y" THEN INPUT"PRESS ENTER WHEN PRINTER READY";Z9$:PRINT
1020 H1$="YEAR    CURR.DEP.     ACCUM.DEP.       BOOK VAL. !"
1030 C1$=" ##     #####.##      #######.##      #######.##"
1035 C2$=" ##                                   #######.##"
1037 IF Z2$="Y" THEN LPRINT "DECLINING BALANCE DEPRECIATION SCHEDULE":LPRINT" ":LPRINT "INITIAL COST = ";C:LPRINT"SALVAGE VALUE = ";S:LPRINT"LIFE OF ASSET(YEARS) = ";L
1038 IF Z2$="Y" THEN LPRINT"RATE OF DEPRECIATION = ";100*RD;"%":LPRINT" "
1040 PRINT H1$:IF Z2$="Y" THEN LPRINT H1$:LPRINT " "
1050 RETURN
1100 REM INITIALIZE SUBROUTINE
1110 AD=0:REM ACCUMULATED DEPRECIATION
1115 DP=C-S :REM AMOUNT TO BE DEPRECIATED
1120 BV=C :REM BOOK VALUE
1125 YR=0 :REM PRESENT YEAR
1150 RETURN
1200 REM COMPUTATION AND PRINTING SUBROUTINE
1210 PRINT USING C2$;YR,C
1215 IF Z2$="Y" THEN LPRINT USING C2$;YR,C:LPRINT" "
1220 FOR I=1 TO L-1
1230 D=BV*RD
1240 BV=BV-D : AD=AD+D 
1250 YR=YR+1
1255 IF BV>=S GOTO 1260
1256 AD=AD-D
1257 D=BV+D-S:AD=AD+D:BV=S
1260 PRINT USING C1$;YR,D,AD,BV
1262 IF Z2$="Y" THEN LPRINT USING C1$;YR,D,AD,BV:GOTO 1270
1265 IF I/10=INT(I/10) THEN GOSUB 1400 ' STOP SCROLLING OFF SCREEN
1270 NEXT I
1280 D=(C-S)-AD
1290 BV=BV-D:AD=AD+D : YR=YR+1
1295 PRINT USING C1$;YR,D,AD,BV
1297 IF Z2$="Y" THEN LPRINT USING C1$;YR,D,AD,BV
1300 RETURN
1400 REM SUBROUTINE TO HOLD OUTPUT ON SCREEN
1410 INPUT "FOR MORE OF TABLE PRESS ENTER";Z9
1420 GOSUB 1000
1430 RETURN
