-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpage35-01.bas
36 lines (36 loc) · 766 Bytes
/
page35-01.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
1 REM
2 REM INTRODUCTION TO COMPUTER PROGRAMMING BASIC FOR BEGINNERS
3 REM BY USBORNE BOOKS
4 REM https://usborne.com/browse-books/features/computer-and-coding-books/
5 REM
6 LET A=0
7 LET B=0
8 LET C=0
9 LET D=0
10 FOR I=1 TO 20
20 PRINT "PERSON ";I;" WAS BORN IN"
30 PRINT "WINTER, SPRING, SUMMER OR AUTUMN"
40 PRINT "TYPE W,SP,SU OR A"
50 INPUT B$
60 IF B$="W" THEN LET A=A+1
70 IF B$="SP" THEN LET B=B+1
80 IF B$="SU" THEN LET C=C+1
90 IF B$="A" THEN LET D=D+1
100 NEXT I
110 PRINT "WINTER TOTAL";
115 LET N=A
120 GOSUB 200
130 PRINT "SPRING TOTAL";
135 LET N=B
140 GOSUB 200
150 PRINT "SUMMER TOTAL";
155 LET N=C
160 GOSUB 200
190 STOP
200 REM SUBROUTINE TO PRINT STARS
210 IF N=0 THEN GOTO 250
220 FOR I=1 TO N
230 PRINT "*";
240 NEXT I
250 PRINT
260 RETURN