1 REM SALELEAS  
2 CLS  
10 CLEAR  1000  
20 PRINT "              SALE-LEASEBACK ANALYSIS":PRINT   
30 PRINT "THE SITUATION FOR THIS PROGRAM IS THE FOLLOWING: AN OWNER OF A  
40 PRINT "PIECE OF PROPERTY NEEDS TO RAISE SOME MONEY AND NEEDS THE USE  
45 PRINT "OF THE PROPERTY. HE CAN SELL THE PROPERTY TO THE INVESTOR AND  
50 PRINT "THEN LEASE IT BACK(SALE-LEASEBACK) OR HE CAN JUST BORROW THE  
60 PRINT "MONEY AS A MORTGAGE ON THE PROPERTY.  
65 PRINT :PRINT "THERE ARE VARIOUS TAX AND OTHER RAMIFICATIONS OF THE TWO  
70 PRINT "SITUATIONS WHICH THIS PROGRAM HELPS ANALYZE."  
99 PRINT :INPUT "PRESS <ENTER> TO CONTINUE";Z9$  
120 CLS  
130 INPUT "ENTER PRESENT VALUE OF PROPERTY(SALE OR MORTGAGE AMT)";PV  
140 INPUT "ENTER TERM OF THE LEASE OR MORTGAGE IN YEARS         ";N  
150 INPUT "ENTER ANNUAL INTEREST RATE FOR LEASE IN %            ";IL:IL=IL/100  
160 INPUT "ENTER ANNUAL INTEREST RATE FOR MORTGAGE IN %         ";IM:IM=IM/100  
170 INPUT "ENTER CORPORATE TAX RATE IN %                        ";CTAX:CTAX=CTAX/100  
180 INPUT "ENTER TOTAL DEPRECIATION OVER TERM OF LEASE/MORTGAGE ";DEPR  
220 CLS:PRINT :PRINT :PRINT :PRINT "                 COMPUTING"  
250 REM TOTAL COST OF SALE-LEASEBACK  
260 BAL=0:I=IL/12:N=12*N:GOSUB 1525:PL=PMT*12:REM ANNUAL RENT PAYMENT=PL FOR LEASE  
270 BAL=0:I=IM/12:GOSUB 1420:PM=PMT*12:N=N/12:REM PM=ANNUAL MORTGAGE PAYMENT  
280 TL=PL*N:REM TOTAL LEASE PAYMENTS OVER LEASE TERM  
290 TM=PM*N:REM TOTAL MORTGAGE PAYMENTS OVER MORTGAGE TERM  
300 DL=TL*CTAX : REM TOTAL TAX DEDUCTION FOR LEASE  
310 LL=TL - DL: REM TOTAL ACTUAL RENTAL COST OF LEASE  
320 RM=TM - PV:REM TOTAL INTEREST PAYMENTS OVER TERM OF MORTGAGE  
330 EM=RM+DEPR:REM TOTAL MORTGAGE TAXABLE EXPENSES  
340 DM=EM*CTAX: REM TOTAL TAX DEDUCTION FOR MORTGAGE  
350 MM=TM - DM:REM TOTAL MORTGAGE COST AFTER TAXES  
400 F$(1)="#########.##"  
410 F$(2)="%                                  %      #########.##"  
500 REM ANALYSIS PRINTOUT  
505 CLS  
510 PRINT USING  F$(2);"PRESENT VALUE OF PROPERTY",PV  
515 PRINT USING  F$(2);"TERM OF LEASE OR MORTGAGE(YEARS)",N  
520 PRINT USING  F$(2);"ANNUAL INTEREST RATE FOR LEASE (%)",100*IL  
525 PRINT USING  F$(2);"ANNUAL INTEREST RATE FOR MORTG (%)",100*IM  
530 PRINT USING  F$(2);"CORPORATE TAX RATE (%)",100*CTAX  
535 PRINT USING  F$(2);"TOTAL DEPRECIATION FOR TERM OF LOAN",DEPR  
540 PRINT   
550 GOSUB  1600:PRINT   
560 PRINT USING  F$(2);"ANNUAL LEASE RENTAL",PL  
570 PRINT USING  F$(2);"TOTAL LEASE PAYMENTS TO TERM",TL  
580 PRINT USING  F$(2);"TOTAL LEASE TAX DEDUCTIONS",DL  
590 PRINT USING  F$(2);"TOTAL ACTUAL COST OF LEASE TO TERM",LL  
600 PRINT :GOSUB  1600:PRINT   
610 PRINT USING  F$(2);"ANNUAL MORTGAGE PAYMENT",PM  
620 PRINT USING  F$(2);"TOTAL MORTGAGE PAYMENTS TO TERM",TM  
630 PRINT USING  F$(2);"TOTAL MORTGAGE INTEREST PAID",RM  
640 PRINT USING  F$(2);"TOTAL MORTGAGE TAXABLE EXPENSES",EM  
650 PRINT USING  F$(2);"TOTAL MORTGAGE TAX DEDUCTION",DM  
660 PRINT USING  F$(2);"TOTAL MORTGAGE COSTS AFTER TAXES",MM  
670 PRINT :PRINT   
680 IF  MM>LL  THEN  PRINT USING  F$(2);"MORTGAGE COSTS MORE THAN LEASE BY ",MM-LL  
690 IF  LL>MM  THEN  PRINT USING  F$(2);"LEASE COSTS MORE THAN MORTGAGE BY ",LL-MM  
750 PRINT :GOSUB  1600  
755 IF Z9$ = "-1" THEN END
760 GOTO  120  
1420 PMT=(PV-BAL*(1+I)[(-N))*I/(1-(1+I)[(-N)):RETURN   
1525 PMT=(PV-BAL*(1+I)[(-N))*I/(1+I)/(1-(1+I)[(-N)):RETURN   
1600 INPUT "PRESS ENTER TO CONTINUE";Z9$:RETURN   

