1 REM TIMUSAN  
5 CLEAR  1000  
10 CLS:PRINT  TAB(10);"TIME USE ANALYSIS":PRINT   
20 PRINT "TO USE THIS PROGRAM THE SUBJECT MUST KEEP A CAREFUL  
30 PRINT "LOG OF HOW HE SPENDS HIS TIME FOR A WEEK, OR POSSIBLY  
35 PRINT "SOME OTHER PERIOD. EACH CATEGORY OF ACTIVITY IS GIVEN A  
40 PRINT "CODE, E.G. LUNCH MIGHT BE A 1. THE CODES ARE SUCCESSIVE  
45 PRINT "INTEGERS BEGINNING WITH 1.  
50 PRINT :PRINT "WHEN THE DESIRED AMOUNT OF DATA IS AVAILABLE THEN  
55 PRINT "FOR EACH ACTIVITY AND TIME PERIOD THE USER ENTERS THE CODE  
60 PRINT "AND NUMBER OF MINUTES PERFORMING THE ACTIVITY.  
70 PRINT :PRINT "THE FINAL PRINTOUT IS A SUMMARY OF THE PROPORTION OF  
75 PRINT "TIME SPENT ON EACH ACTIVITY"  
90 PRINT :INPUT "PRESS ENTER TO BEGIN";Z9$  
100 CLS  
110 INPUT "ENTER THE NUMBER OF DIFFERENT ACTIVITY CATEGORIES";N  
115 R=300:DIM  A$(N+1),C(R),T(R),CT(N+1),NT(N+1)  
120 PRINT   
130 FOR  I = 1  TO  N  
140 PRINT "CATEGORY";I;"DESCRIPTION(<=10 CHARACTERS)";:INPUT  A$(I)  
150 NEXT  I  
155 PRINT   
160 GOSUB  1000  
165 PRINT   
170 INPUT "IS CATEGORY PRINTOUT ON LINE PRINTER DESIRED(Y/N)";Z2$  
180 IF  Z2$<>"Y"  AND  Z2$<>"N"  THEN  GOSUB  10000:GOTO  170  
190 IF  Z2$="Y"  THEN  INPUT "PRESS ENTER WHEN LINE PRINTER READY";Z9$  
200 IF  Z2$="Y"  THEN  FOR  I=1 TO N:LPRINT  I;"---";A$(I),:NEXT   
202 IF  Z2$="Y"  THEN  LPRINT " "  
250 CLS  
260 PRINT "TIME USE INPUT NEXT. FOR EACH ITEM ENTER CODE AND  
265 PRINT "NUMBER OF MINUTES PERFORMING THE ACTIVITY AT THIS  
270 PRINT "TIME. ENTER 0,0 TO END AND -1,0 TO DISPLAY CATEGORIES  
271 PRINT "300 ENTRIES MAY BE MADE"  
272 PRINT "THERE ARE ";N;" CATEGORIES."  
275 J=0:REM NUMBER OF TIME USE ITEMS  
280 PRINT   
290 PRINT "ENTRY";J+1;:INPUT "ENTER CATEGORY #,TIME(0,0 END   -1,0 DISPLAY";C(J+1),T(J+1)  
295 IF C(J+1)=0 AND T(J+1)=0 THEN GOTO 400 ' FINISH ENTRY  
297 IF  C(J+1)=-1  AND  T(J+1)=0  THEN  GOSUB  1000:GOTO  280  
300 IF  C(J+1)<>INT(C(J+1))  OR  C(J+1)<1  OR  C(J+1)>N  THEN  GOSUB  10000:GOTO  280  
310 J=J+1  
320 T=T+T(J):REM TOTAL TIME  
330 CT(C(J))=CT(C(J))+T(J):REM TOTAL TIME IN CATEGORY  
335 NT(C(J))=NT(C(J))+1:REM NO. TIMES IN CATEGORY  
340 GOTO  290  
400 REM ANALYSIS AND PRINTOUT  
410 F$(1)="CAT #    DESCRIPTION   TIME(MIN)   # OCCUR   AVG.TIME  % TOTAL"  
420 F$(2)=" ###     %         %    #####.#      ###      ####.#    ###.##"  
430 CLS  
440 INPUT "IS LINE PRINTER OUTPUT AVAILABLE(Y/N)";Z2$  
450 IF  Z2$<>"Y"  AND  Z2$<>"N"  THEN  GOSUB  10000:GOTO  440  
460 IF  Z2$="Y"  THEN  INPUT "PRESS ENTER WHEN LINE PRINTER READY";Z9$  
470 IF  Z2$="Y"  THEN  LPRINT  TAB(20); "TIME USE ANALYSIS":LPRINT " "  
480 CLS:PRINT  F$(1):IF  Z2$="Y"  THEN  LPRINT  F$(1):LPRINT " "  
490 FOR  I= 1  TO  N  
500 IF  NT(I)>0  THEN  PRINT USING  F$(2);I,A$(I),CT(I),NT(I),CT(I)/NT(I),CT(I)/T*100  
510 IF  NT(I)=0  THEN  PRINT USING  F$(2);I,A$(I),CT(I),NT(I),0,CT(I)/T*100  
520 IF  Z2$<>"Y"  THEN  GOTO  550  
530 IF  NT(I)>0  THEN  LPRINT  USING  F$(2);I,A$(I),CT(I),NT(I),CT(I)/NT(I),CT(I)/T*100  
540 IF  NT(I)=0  THEN  LPRINT  USING  F$(2);I,A$(I),CT(I),NT(I),0,CT(I)/T*100  
550 IF  I/12=INT(I/12)  THEN  GOSUB  10100:CLS:PRINT  F$(1)  
560 NEXT  I  
570 PRINT :END  
1000 REM LIST CATEGORIES ON SCREEN  
1010 CLS:FOR  I=1 TO N:PRINT  I;"  ";A$(I),:NEXT :RETURN   
10000 PRINT "INPUT ERROR! TRY AGAIN!":FOR  JE=1 TO 300:NEXT :RETURN   
10100 INPUT "PRESS ENTER TO CONTINUE";Z9$:RETURN   

