-
Notifications
You must be signed in to change notification settings - Fork 0
/
MULTIPLE.BAS
39 lines (39 loc) · 994 Bytes
/
MULTIPLE.BAS
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
' Multiplication master | IchigoCake BASIC 0.9.8-RC3+
' Copyright (c) 2020 Keiichi Shiga (BALLOON | FU-SEN)
' The MIT License (MIT) - https://mit.balloon.net.eu.org/#2020
10 'カケザン マスター
20 A=5:B=2
30 C=A:D=B:CLS
40 IF A>B C=B:D=A
50 LC B,0:FOR I=1 TO A
60 J=RND(10)
70 IF I=1 AND J=0 GOTO 60
80 ?J;:NEXT:LC C-1,1:?"x";
90 LC A,1:FOR I=1 TO B
100 J=RND(9)+1:?J;:NEXT
110 LC C-1,2:FOR I=0 TO D
120 ?CHR$(145);:NEXT
130 FOR J=1 TO B:K=0
140 FOR I=A TO 0 STEP -1:L=0
150 IF I<>0 L=SCR(B+I-1,0)-48
160 M=SCR(A+B-J,1)-48
170 N=L*M+K:O=N%10:K=N/10
180 IF I=0 AND O=0 GOTO 220
190 LC B+I-J,J+2:?CHR$(143);
200 IF INKEY()-48<>O GOTO 200
210 LC B+I-J,J+2:?CHR$(O+48);
220 NEXT:NEXT:LC 0,B+3
230 IF B=1 END
240 FOR I=1 TO A+B
250 ?CHR$(145);:NEXT:K=0
260 FOR I=A+B-1 TO 0 STEP -1
270 N=K:FOR J=1 TO B
280 M=SCR(I,J+2):IF M>0 M=M-48
290 N=N+M:NEXT
300 O=N%10:K=N/10
310 IF I=0 AND O=0 GOTO 350
320 LC I,B+4:?CHR$(143);
330 IF INKEY()-48<>O GOTO 330
340 LC I,B+4:?O;
350 NEXT
360 LC 0,B+5