20 PRINT : PRINT "** DEPRECIATION ANALYSIS **" : PRINT
21 REM CLEAR EVERYTHING IN CASE WE LOOP
22 A=0 : D1=0 : D2=0 : D3=0 : F=0 : S9=0 : T=0
30 PRINT "ENTER THE FOLLOWING INFORMATION:" : PRINT
40 PRINT TAB(15)"COST OF ASSET :";TAB(40); : INPUT C
50 PRINT TAB(15)"USEFUL LIFE IN YEARS"
60 PRINT TAB(15)"( WHOLE YEARS ONLY ) :";TAB(40); : INPUT Y
70 PRINT TAB(15)"SALVAGE VALUE :";TAB(40); : INPUT S
80 PRINT
90 PRINT
179 REM ********* SET ALL BALANCES TO COST *********
180 B1=C : B2=C : B3=C
199 REM ********* SET UP SUM OF YEARS DIGITS *********
200 T=0
205 FOR I=1 TO Y : T=T+I : NEXT I
208 REM *** SET UP DOUBLE DECLINING BALANCE PRECENTAGE ***
210 P=(1/Y)*2
212 P=(P+5E-03)*100 : P=INT(P)/100
218 REM ********* SET UP STRAIGHT LINE AMOUNT *********
220 D1=(C-S)/Y
222 D1=(D1+5E-03)*100 : D1=INT(D1)/100
240 REM ********* PRINT SPECIFIERS *********
250 L$="##   #####.##  ######.##   #####.##  ######.##   #####.##  ######.##"
262 PRINT "       COST : ";C;"     USEFUL LIFE : ";Y;
265 PRINT "     SALVAGE : ";S
266 PRINT : PRINT TAB(20);STRING$(30,45) : PRINT
267 PRINT "           S. LINE            S. YRS. DIGITS        DBL. DEC BAL."
268 PRINT "YR      DEP        BAL        DEP        BAL        DEP        BAL"
269 PRINT STRING$(69,61)
299 REM ******** WORKING LOOP ********
300 FOR I=1 TO Y
302 B1=B1-D1
304 IF B1-S < .05 THEN B1=S
312 A=(Y-(I-1))/T : A=(A+5E-03)*100
320 A=INT(A)/100 : D2=A*(C-S)
322 IF B2-D2 < S THEN D2=B2-S
324 B2=B2-D2
328 IF F=1 THEN 360
330 IF B3 <= S THEN D3=0 : B3=S : GOTO 370
340 D3=B3*P
342 S9=(B3-S)/(Y-(I-1))
344 IF D3 < S9 THEN D3=S9 : F=1 : GOTO 360
350 IF B3-D3 < S THEN D3=B3-S
360 B3=B3-D3
370 PRINT USING L$; I,D1,B1,D2,B2,D3,B3
380 IF I/10 <> INT(I/10) THEN 400
385 PRINT : PRINT : PRINT : PRINT
390 PRINT "PRESS <CR> TO CONTINUE "; : INPUT A$
400 NEXT I
405 PRINT : PRINT : PRINT
410 PRINT " DO YOU WANT ANOTHER ANALYSIS "; : INPUT Q$
420 IF LEFT$(Q$,1)="Y" THEN 20
430 REM
9999 END
NT : PRINT : PRINT
410 PRINT " DO YOU WANT ANOTHER ANALYSIS