10 REM PGM. NAME: PERFT2. Tests a number to see if it is perfect. 20 MODE7 30 INPUT"Enter an even number. "N$ 40 N%=VAL(N$):IF INT(N%/2)<>N%/2 THEN N%=N%+1 50 PRINT'"Factor";TAB(10)"Total of factors"' 60 D%=0:T%=0 70 REPEAT 80 D%=D%+1 90 IF N%/D%=INT(N%/D%) AND D%<>SQR(N%) AND D%<>1 THEN T%=T%+D%:PRINT TAB(0)D%,TAB(20)T%:T%=T%+N%/D%:PRINT TAB(0)N%/D%,TAB(20)T% 95 IF N%/D%=INT(N%/D%) AND (D%=SQR(N% ) OR D%=1) THEN T%=T%+D%:PRINT TAB(0)D%,TAB(20)T% 100 UNTIL D%>SQR(N%) 110 IF T%N% THEN PRINT'"The number ";N%;" is excessive." 120 PRINT''"Press the SPACE-BAR to enter another." 130 G=GET:GOTO 20