1 REM FINRAT
5 CLEAR 3000
10 CLS
20 PRINT TAB(10); "FINANCIAL RATIOS":PRINT
30 PRINT"THIS PROGRAM WILL COMPUTE SOME COMMONLY USED FINANCIAL RATIOS
35 PRINT"USING INFORMATION FROM A FIRM'S BALANCE SHEET AND INCOME
40 PRINT"STATEMENT. THE PROGRAM IS MENU DRIVEN. DATA FOR A COMPANY
45 PRINT"MAY BE INPUT, COMPUTATIONS MAY TAKE PLACE, INPUT DATA MAY
50 PRINT"BE EDITED, AND THE DATA MAY EVEN BE STORED ON CASSETTE OR
55 PRINT"DISKETTE. THE PROGRAM MAY BE EASILY MODIFIED BY THOSE
60 PRINT"DESIRING TO COMPUTE OTHER RATIOS OR DESIRING TO SHOW MORE
65 PRINT"DETAIL IN THE BALANCE SHEET.
90 PRINT:INPUT"PRESS ENTER TO BEGIN";Z9$
100 DIM A$(40),A(40),R$(30),R(30),B$(30),B(30)
110 FOR I=1 TO 27:READ A$(I):NEXT
113 FOR I=1 TO 13:READ R$(I):NEXT
120 GOSUB 9000
140 PRINT
150 INPUT"ARE DISK DRIVES ATTACHED(Y/N)";Z7$
160 IF Z7$<>"Y" AND Z7$<>"N" THEN GOSUB 10000:GOTO 150
200 CLS:PRINT TAB(10); "MENU":PRINT
205 PRINT"0. QUIT
210 PRINT"1. INPUT BALANCE SHEET AND INCOME DATA
220 PRINT"2. PRINT OUT BALANCE SHEET AND INCOME DATA AS INPUT
230 PRINT"3. EDIT INPUT DATA
240 PRINT"4. COMPUTE AND PRINT OUT APPROPRIATE RATIOS
250 PRINT"5. STORE COMPANY INPUT DATA ONTO DISKETTE
260 PRINT"6. READ COMPANY INPUT DATA FROM DISKETTE
270 PRINT"7. STORE COMPANY INPUT DATA ONTO CASSETTE
280 PRINT"8. READ COMPANY INPUT DATA FROM CASSETTE
290 PRINT"9. CHANGE DATE
300 INPUT"INPUT YOUR CHOICE";Z1
305 IF Z1 = 0 THEN END
310 ON Z1 GOSUB 6000,6100,6200,6300,4000,4100,4200,4300,900
320 GOTO 200
900 CLS:PRINT "DATE CHANGE":PRINT
910 PRINT"PRESENT DATE FOR DATA IS  ";D$;:INPUT"NEW DATE ";D$
920 RETURN
4000 REM PRINT OUT DATA FOR COMPANY ON DISKETTE
4010 CLS:INPUT"PRESS ENTER WHEN DISKETTE READY";Z9$
4020 PRINT
4030 PRINT"PRESENT DISK FILE NAME IS ";C$;:INPUT"   NEW NAME";C$
4040 OPEN"O",1,C$
4050 FOR I=1 TO 27:WRITE # 1,A(I):NEXT:WRITE # 1,D$
4060 CLOSE #1
4070 RETURN
4100 REM INPUT DATA FOR COMPANY FROM DISKETTE
4110 CLS:INPUT"PRESS ENTER WHEN DISKETTE READY";Z9$
4120 PRINT
4130 INPUT"ENTER NAME OF DISK FILE ";C$
4140 OPEN"I",1,C$
4150 FOR I=1 TO 27:INPUT #1,A(I):NEXT:INPUT #1,D$
4160 CLOSE #1
4170 RETURN
4200 REM INPUT COMPANY DATA FROM CASSETTE
4210 CLS:INPUT"PRESS ENTER WHEN CASSETTE READY";Z9$
4220 ' IF Z7$="Y" THEN CMD"T"
4230 FOR I=1 TO 27:INPUT #-1,A(I):NEXT:INPUT #-1,D$
4240 RETURN
4300 REM PRINT COMPANY DATA ONTO CASETTE
4310 CLS:INPUT"PRESS ENTER WHEN CASSETTE READY";Z9$
4320 ' IF Z7$="Y" THEN CMD"T"
4330 FOR I=1 TO 27:WRITE #-1,A(I):NEXT:WRITE #-1,D$
4340 RETURN
6000 REM INPUT OF BALANCE SHEET AND INCOME STATEMENT DATA
6005 CLS:PRINT"ENTER THE FOLLOWING DATA":PRINT
6010 FOR I=1 TO 27
6020 PRINT A$(I);TAB(40);:INPUT A(I)
6030 NEXT I
6040 RETURN
6100 REM DISPLAY INPUTS
6105 CLS
6110 INPUT"IS LINE PRINTER OUTPUT DESIRED(Y/N)";Z2$
6120 IF Z2$<>"Y" AND Z2$<>"N" THEN GOSUB 10000:GOTO 6110
6125 IF Z2$="Y" THEN INPUT"PRESS ENTER WHEN PRINTER READY";Z9$
6130 CLS
6135 PRINT "DATE IS ";D$:IF Z2$="Y" THEN LPRINT "DATE IS ";D$:LPRINT " "
6140 FOR I=1 TO 27
6150 PRINT USING F$(1);I,A$(I),A(I):IF Z2$="Y" THEN LPRINT USING F$(1);I,A$(I),A(I)
6160 IF Z2$="N" AND I/14=INT(I/14) THEN GOSUB 10100
6170 NEXT I
6180 GOSUB 10100
6190 RETURN
6200 REM EDIT INPUT ITEM
6210 CLS
6220 FOR I=1 TO 27:PRINT USING F$(1);I,A$(I),A(I):FOR JJ=1 TO 300:NEXT:NEXT I
6230 INPUT"INPUT ITEM # TO CHANGE(0 TO END)";II
6240 IF II=0 THEN RETURN
6250 PRINT:PRINT USING F$(2);II,A$(II),A(II);
6260 INPUT A(II)
6270 PRINT:GOTO 6230
6300 REM COMPUTATION AND PRINTOUT OF RATIOS AND OTHER DERIVED DATA
6305 INPUT"IS LINE PRINTER OUTPUT DESIRED(Y/N)";Z2$
6307 IF Z2$<>"Y" AND Z2$<>"N" THEN GOSUB 10000:GOTO 6305
6310 B(1)=A(11)+A(12)+A(13)+A(14)+A(15):REM CURRENT ASSETS
6320 B(2)=A(16)+A(17)+A(18)+A(19):REM FIXED & INTANGIBLE ASSETS
6330 B(3)=B(1)+B(2):REM TOTAL ASSETS
6340 B(4)=B(3)-A(19):REM TOTAL OPERATING ASSETS
6350 B(5)=A(20)+A(21)+A(22)+A(23):REM CURRENT LIABILITIES
6360 B(6)=A(24)+A(25):REM LONG TERM DEBT & PREFERRED
6370 B(7)=A(26):REM RETAINED EARNINGS
6380 B(8)=A(27):REM COMMON STOCK
6390 B(9)=B(7)+B(8):REM TOTAL STOCKHOLDERS EQUITY
6400 B(10)=B(5)+B(6)+B(9):REM TOTAL LIABILITIES AND EQUITY
6410 B(11)=A(1)-A(2):REM GROSS MARGIN
6420 B(12)=B(11)-A(3)-A(4)-A(5)-A(6):REM INCOME FROM OPERATIONS
6430 B(13)=B(12):REM EBIT
6440 B(14)=B(13)-A(7):REM EBT
6450 B(15)=B(14)-A(8):REM EARNINGS AFTER TAXES
6460 B(16)=A(9):REM DIVIDENDS ON PREFERRED STOCK
6470 B(17)=B(15)-B(16):REM EARNINGS AVAILABLE TO COMMON SHAREHOLDERS
6480 B(18)=B(1) - B(5) :REM WORKING CAPITAL
6500 REM RATIOS NEXT
6510 R(1)=B(17)/A(10):REM EPS
6520 R(2)=A(1)/B(4):REM TURNOVER OF OPERATING ASSETS
6530 R(3)=B(1)/B(5):REM CURRENT RATIO
6540 R(4)=(A(11)+A(12))/B(5):REM ACID TEST RATIO
6550 R(5)=A(1)/A(13):REM RECEIVABLES TURNOVER
6560 R(6)=A(2)/A(14):REM INVENTORY TURNOVER
6570 R(7)=B(11)/A(1):REM GROSS PROFIT MARGIN
6580 R(8)=A(1)/B(18):REM WORKING CAPITAL TURNOVER
6590 R(9)=B(15)/B(18):REM NET PROFITS TO WORKING CAPITAL
6600 R(10)=B(5)/(B(9)+A(25)-A(19)):REM CURRENT DEBT TO NET WORTH
6610 R(11)=B(18)/B(3):REM WORKING CAPITAL TO TOTAL ASSETS
6620 R(12)=A(1)/B(3):REM SALES TO TOTAL ASSETS
6630 R(13)=B(9)/A(10):REM BOOK VALUE PER SHARE
6800 REM PRINT RATIOS
6805 CLS
6807 PRINT D$:IF Z2$="Y" THEN LPRINT "DATE IS ";D$:LPRINT
6810 FOR I=1 TO 13
6820 PRINT USING F$(3);R$(I),R(I)
6830 IF Z2$="Y" THEN LPRINT USING F$(3);R$(I),R(I)
6840 NEXT I
6850 GOSUB 10100
6860 RETURN
8000 REM DATA
8010 DATA SALES,COST OF GOODS SOLD,ADMINISTRATIVE & SELLING EXP.,GENERAL EXPENSES,DEPRECIATION,OTHER EXPENSES,INTEREST EXPENSE,INCOME TAXES,DIVIDENDS ON PREFERRED STOCKS,SHARES OUTSTANDING
8020 DATA CASH,MARKETABLE SECURITIES,NET ACCTS RECEIVABLE,INVENTORY,PREPAID EXPENSE,NET PLANT & EQUIP.,NET BUILDINGS, LAND(COST),INTANGIBLES
8030 DATA ACCOUNTS PAYABLE,NOTES PAYABLE,ACCRUED EXPENSES,LONG TERM DEBT(CURR. PORTION),LONG TERM DEBT(NON CURR),PREFERRED STOCK,RETAINED EARNINGS, COMMON STOCK
8050 DATA EPS,TURNOVER OF OPERATING ASSETS,CURRENT RATIO,ACID TEST RATIO,RECEIVABLES TURNOVER,INVENTORY TURNOVER
8060 DATA GROSS PROFIT MARGIN,WORKING CAPITAL TURNOVER,NET PROFITS TO WORKING CAPITAL,CURRENT DEBT TO NET WORTH
8070 DATA WORKING CAPITAL TO TOTAL ASSETS,SALES TO TOTAL ASSETS,BOOK VALUE PER SHARE
9000 REM PRINTING FORMATS
9010 F$(1)="##   %                                   %   #########.##"
9020 F$(2)="##  %                       %    ########.##"
9030 F$(3)="%                                   %   ####.##"
9099 RETURN
10000 PRINT"INPUT ERROR! TRY AGAIN":FOR JJ=1 TO 300:NEXT:RETURN
10100 INPUT"PRESS ENTER TO CONTINUE";Z9$:RETURN
