
2K minimum
How about a program to get you into the spirit for the holidays? This little ditty should be a suprise to all but the most advanced programmers.
HAPPY HOLIDAYS
10 FOR N = 1 TO 176
20 PRINT CHR$ 128 + CHR$ 128 +
CHR$ 128 + CHR$ 128;
30 NEXTN
40 FOR N = 1 TO 10
50 LET A = (15*RND) + 2
60 LET B = (25*RND) + 2
70 PRINT AT A,B; CHR$ 1 + CHR$
132; AT A + 1, B - 1; CHR$ 1
+ " " + CHR$ 132; AT A + 2,
B - 2; CHR$ 1 + " " +
CHR$ 132; AT A + 3, B; CHR$ 5
80 NEXT N
900 LET A$ = ""
910 FOR N = 1 TO 30
920 LET A$ = A$ + CHR$ 128
930 NEXT N
940 LET B$ = "173166181181190128173
1801771741691661901841281711831
8017812818419017916817318318015
0184170185185170128"
950 FOR N = 1 TO LEN B$ - 2 STEP 3
960 LET A$ = A$ + CHR$ VAL B$(N TO
N + 2)
970 NEXT N
1000 PRINT AT 11,1; A$(TO 30)
1010 LET A$ = A$(2 TO LEN A$) +
A$(1)
1020 UNPLOT RND*62, RND*63
1030 GOTO 1000
After you have impressed your friends with that one, you may want to show them something that is close to being magic. Did you know that the computer can figure out what day of the week any date in history falls on? You input the date, month and year (numbers only) and this program will do the rest. The only catch is, the date must be after the year 1752. I doubt if anyone out there has a birthday before that.
DATES, PAST, PRESENT & FUTURE
10 DIM D$(7,9)
20 LET D$(1) = "SUNDAY"
30 LET D$(2) = "MONDAY"
40 LET D$(3) = "TUESDAY"
50 LET D$(4) = "WEDNESDAY"
60 LET D$(5) = "THURSDAY"
70 LET D$(6) = "FRIDAY"
80 LET D$(7) = "SATURDAY"
90 PRINT ,,,,"ENTER THE YEAR?"
100 INPUT Y
110 IF Y < 1753 THEN GOTO 100
120 PRINT "ENTER THE MONTH?"
130 INPUT M
140 IF M < 1 OR M > 12 THEN
GOTO 130
150 PRINT "ENTER THE DATE?"
160 INPUT D
170 IF D < 0 OR D > 31 THEN
GOTO 160
180 LET K = INT (.6 + (1/M))
190 LET L = Y - K
200 LET O = M + 12*K
210 LET P = L/100
220 LET Z1 = INT (P/4)
230 LET Z2 = INT P
240 LET Z3 = INT ((5*L)/4)
250 LET Z4 = INT (13*(O + 1)/5)
260 LET Z = Z4 + Z3 - Z2 + Z1
+ D [illegible] 1
270 LET Z = Z - (7*INT (Z/7)) +1
280 LET Y$ == STR$ Y
290 PRINT ,,M; "/";D; "/"; Y$
(LEN Y$ - 1 TO LEN Y$);
" FALLS ON A "; D$(Z)
300 INPUT A$
310 CLS
320 RUN
It is not that hard to use this routine to put a calender on the screen for any month.
Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.