Skip to content

Instantly share code, notes, and snippets.

@dadecoza
Last active December 13, 2022 16:06
Show Gist options
  • Save dadecoza/62f3849242fcd61998efacbcc2f66266 to your computer and use it in GitHub Desktop.
Save dadecoza/62f3849242fcd61998efacbcc2f66266 to your computer and use it in GitHub Desktop.
10 REM @DADECOZA
20 LET Y=5
30 REM TOP
40 FOR A=1 TO Y
50 FOR B=1 TO Y
60 PRINT " ";
70 NEXT B
80 FOR B=1 TO A
90 PRINT "*";
100 NEXT B
110 FOR B=1 TO (Y*2)-(A*2)
120 PRINT " ";
130 NEXT B
140 FOR B=1 TO A
150 PRINT "*";
160 NEXT B
170 PRINT
180 NEXT A
190 REM MIDDLE TOP
200 FOR A=1 TO Y
210 FOR B=1 TO A
220 PRINT " ";
230 NEXT B
240 FOR B=1 TO Y
250 PRINT "*";
260 NEXT B
270 FOR B=1 TO ((Y*2)-(A*2))+Y
280 PRINT "*";
290 NEXT B
300 PRINT
310 NEXT A
320 REM MIDDLE BOTOM
330 FOR A=1 TO Y-1
340 FOR B=1 TO Y-A
350 PRINT " ";
360 NEXT B
370 FOR B=1 TO Y-1
380 PRINT "*";
390 NEXT B
400 FOR B=1 TO Y+1+(A*2)
410 PRINT "*";
420 NEXT B
430 PRINT
440 NEXT A
450 REM BOTTOM
460 FOR A=1 TO Y
470 FOR B=1 TO Y
480 PRINT " ";
490 NEXT B
500 FOR B=1 TO Y-A+1
510 PRINT "*";
520 NEXT B
530 FOR B=1 TO (A*2)-2
540 PRINT " ";
550 NEXT B
560 FOR B=1 TO Y-A+1
570 PRINT "*";
580 NEXT B
590 PRINT
600 NEXT A
610 END
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment