input a,b,c print "a=";a,"b=";b,"c=";c let x1=(-b+sqr(b*b-(4*a*c)))/(2*a) let x2=(-b-sqr(b*b-(4*a*c)))/(2*a) print "x1=";x1,"x2=";x2 end 今日此の欄を発見して書き込みました。
10 DIM ODD(2,10000000) LET C=1 20 FOR I=1 TO 9999999 30 LET ODD(1,I)=I*2+1 LET ODD(2,I)=0 NEXT I 40 FOR J=1 TO 9999999 50 LET N=(J*2+1)*2 60 FOR K=N/2+N TO INT((20000000-N/2)/N)*N STEP N 70 LET ODD(2,INT(K/2))=1 80 NEXT K 90 NEXT J 100 LET K=1 110 IF ODD(2,K)=0 THEN LET C=C+1 120 IF C=1000000 THEN GOTO 200 130 LET K=K+1 GOTO 110 200 PRINT ODD(1,K) END
10 OPTION ARITHMETIC RATIONAL 20 LET C=11 30 LET K=3 40 IF INT(C/K)<>(C/K) THEN 50 IF INT(C/3)>K THEN 60 LET K=K+2 70 GOTO 40 80 END IF 90 END IF 100 REM 110 IF INT(C/K)<>(C/K) THEN PRINT C; 120 LET C=C+2 130 IF C>10000 THEN STOP 1221 GOTO 30 END
100 LET ANS=8 DIM N(7) 110 FOR I=1 TO 7 READ N(I) NEXT I 120 FOR A=1 TO 6 FOR B=A+1 TO 7 FOR C=1 TO INT((200-N(B))/N(A)) FOR D=1 TO INT((200-N(A))/N(B)) 130 LET SUM=N(A)*C+N(B)*D 140 GOSUB 1221 150 NEXT D NEXT C NEXT B NEXT A 155 PRINT"5",ANS
160 FOR A=1 TO 5 FOR B=A+1 TO 6 FOR C=B+1 TO 7 FOR D=1 TO INT((200-N(B)-N(C))/N(A)) FOR E=1 TO INT((200-N(A)-N(C))/N(B)) FOR F=1 TO INT((200-N(A)-N(B))/N(C)) 170 LET SUM=N(A)*D+N(B)*E+N(C)*F 180 GOSUB 1221 190 NEXT F NEXT E NEXT D NEXT C NEXT B NEXT A 195 PRINT "4",ANS
200 FOR A=1 TO 4 FOR B=A+1 TO 5 FOR C=B+1 TO 6 FOR D=C+1 TO 7 210 FOR E=1 TO INT((200-N(B)-N(C)-N(D))/N(A)) FOR F=1 TO INT((200-N(A)-N(C)-N(D))/N(B)) FOR G=1 TO INT((200-N(A)-N(B)-N(D))/N(C)) FOR H=1 TO INT((200-N(A)-N(B)-N(C))/N(D)) 220 LET SUM=N(A)*E+N(B)*F+N(C)*G+N(D)*H 230 GOSUB 1221
250 FOR A=1 TO 3 FOR B=A+1 TO 4 FOR C=B+1 TO 5 FOR D=C+1 TO 6 FOR E=D+1 TO 7 260 FOR F=1 TO INT((200-N(B)-N(C)-N(D)-N(E))/N(A)) FOR G=1 TO INT((200-N(A)-N(C)-N(D)-N(E))/N(B)) FOR H=1 TO INT((200-N(A)-N(B)-N(D)-N(E))/N(C)) FOR I=1 TO INT((200-N(A)-N(B)-N(C)-N(E))/N(D)) FOR J=1 TO INT((200-N(A)-N(B)-N(C)-N(D))/N(E)) 270 LET SUM=N(A)*F+N(B)*G+N(C)*H+N(D)*I+N(E)*J 280 GOSUB 1221
6 LET K=1 10 DIM TOWN(127),FIRST(127),END(127),TD$(127),PM$(127),PM(127),L$(127),BOX(127) 12 LET C=1 20 INPUT Q$ 30 FOR I=1 TO LEN(Q$) 40 IF Q$(I:I)="+" OR Q$(I:I)="-" THEN 50 LET PM(K)=I 60 LET PM$(K)=Q$(I:I) 70 LET K=K+1 80 END IF 90 NEXT I 95 IF K=1 THEN GOTO 999 100 LET L$(1)=Q$(1:PM(1)-1) 105 IF K=2 THEN 107 LET L$(2)=Q$(PM(1)+1:LEN(Q$)) 108 GOTO 140 109 END IF 110 FOR I=2 TO K-1 120 LET L$(I)=Q$(PM(I-1)+1:PM(I)-1) 130 NEXT I 132 LET L$(K)=Q$(PM(K-1)+1:LEN(Q$)) 140 FOR I=1 TO K 150 PRINT L$(I) &" "; 160 NEXT I 170 GOTO 1000 999 LET L$(1)=Q$
1000 FOR n=1 TO K 1040 LET L=LEN(L$(n)) 1050 LET FIRST(1)=1 1060 FOR J=1 TO L 1070 IF L$(n)(J:J)="*" OR L$(n)(J:J)="/" THEN 1080 LET END(C)=J-1 1090 LET TD$(C)=L$(n)(J:J) 1100 LET FIRST(C+1)=J+1 1110 LET C=C+1 1115 END IF 1120 NEXT J 1125 LET END(C)=L 1130 FOR J=1 TO C 1140 LET TOWN(J)=VAL(L$(n)(FIRST(J):END(J))) 1150 NEXT J 1160 FOR J=1 TO C 1170 PRINT TOWN(J); 1180 NEXT J 1190 FOR J=1 TO C 1200 PRINT TD$(J) &" "; 1210 NEXT J 1220 LET BOX(n)=TOWN(1) 1225 IF C=1 THEN GOTO 1280 1230 FOR M=2 TO C 1240 IF TD$(M-1)="*" THEN LET BOX(n)=BOX(n)*TOWN(M) 1250 IF TD$(M-1)="/" THEN LET BOX(n)=BOX(n)/TOWN(M) 1260 NEXT M 1270 PRINT BOX(n) 1280 LET C=1 1300 NEXT n 1350 LET ANSWER=BOX(1)
1400 FOR n=2 TO K 1500 IF PM$(n-1)="+" THEN LET ANSWER=ANSWER+BOX(n) 1600 IF PM$(n-1)="-" THEN LET ANSWER=ANSWER-BOX(n) 1700 NEXT n 1750 PRINT 1800 PRINT ANSWER END
10 READ n 20 DIM X(n) 30 FOR i=1 TO n 40 Sx=Sx+X(i) 50 NEXT i 60 LET Xav=Sx/n 70 PRINT USING "Xav#.#":Xav; 80 FOR i=1 TO n 90 Sxx=Sxx+(x(i)-Xav)^2 100 NEXT i
10 CLEAR 20 PRINT "hi, world." 30 FOR i=1 TO 1000000 40 NEXT i 50 CLEAR 60 PRINT "her "; 70 FOR i=1 TO 1000000 80 NEXT i 90 PRINT "storie" 100 FOR i=1 TO 1000000 110 NEXT i 604 REM 999 DECLARE EXTERNAL SUB s1 1000 OPEN #1:NAME "herstoriejan.TXT",ACCESS INPUT 1221 INPUT #1:ck$
1969 IF ck$="333" THEN 1970 PRINT 1976 FOR i=1 TO 10000000 1977 NEXT i 1980 PRINT 1981 GOTO 2050 1985 END IF 1986 IF ck$="805" THEN GOTO 20000 1987 IF ck$="000" THEN 1988 GOSUB 122170 1989 GOTO 2050 1990 END IF 1991 IF ck$="999" THEN 1995 PRINT 1999 GOTO 2050 2000 END IF 2001 PRINT ck$; 2050 FOR i=1 TO 500000 2061 NEXT i 3001 GOTO 1221 7777 CLOSE #1 20000 REM 30000 GOTO 150000 122170 FOR i=1 TO 10000000 130000 NEXT i 140000 PRINT 141312 RETURN 150000 REM END
>>123 DIM a(10) LET a(1) = 1 LET a(2) = 3 LET a(3) = 7 LET a(4) = 8 LET a(5) = 13 LET a(6) = 18 LET a(7) = 20 LET a(8) = 25 LET a(9) = 30 LET a(10) = 32
DO INPUT PROMPT "n = ": n IF n > 10 THEN PRINT "10以下の数字を入力してください" ELSE EXIT DO END IF LOOP RANDOMIZE LET i = 1
DO WHILE i <= n LET r = 1 + INT(RND*n) IF a(r) <> 0 THEN PRINT a(r); LET a(r) = 0 LET i = i + 1 END IF LOOP
10 LET F$ = "E:ABC.TXT" 20 OPEN #1 : NAME F$ 30 ERASE #1 40 LET C=3 50 LET K=11 64 IF MOD(K,C)=0 THEN GOTO 130 70 IF MOD(C,6)=1 THEN C=C+4 ELSE LET C=C+2 80 IF K<C*C THEN 90 PRINT #1 : K 100 GOTO 130 110 END IF 120 GOTO 64 130 LET C=3 140 IF MOD(K,6)=1 THEN LET K=K+4 ELSE LET K=K+2 1000 IF K>1000000 THEN GOTO 10000 1221 GOTO 64 10000 PRINT C,K 10001 CLOSE #1 10002 END