Программа рисует надпись QBasic. Причём каждая буква закрашивается разным цветом- QBasic(Бейсик)

cls
randomize timer
? "q", int(rnd(1)*12)
? "b", int(rnd(1)*12)
? "a", int(rnd(1)*12)
? "s", int(rnd(1)*12)
? "i", int(rnd(1)*12)
? "c", int(rnd(1)*12)
CLS
SCREEN 12
RANDOMIZE TIMER
u$ = "QBasic"
FOR i = 1 TO LEN(u$)
    COLOR FIX(RND * 16)
    PRINT MID$(u$, i, 1);
NEXT
SCREEN 9, , 1, 0
PRINT "Wait...": PCOPY 1, 0: CLS 1
LINE (0, 0)-(639, 479), 15, BF
FOR i = 1 TO 6
COLOR 9 + i MOD 4: PRINT MID$("GOOGLE", i, 1);
NEXT
x = 240: y = 100
FOR iy = 0 TO 11: FOR ix = 0 TO 45
  c = POINT(ix, iy): IF c = 0 THEN c = 15
  LINE (ix * 4 + x, iy * 4 + y)-(ix * 4 + 3 + x, iy * 4 + 3 + y), c, BF
NEXT: NEXT
 
FOR iy = y TO y + 48: FOR ix = x TO x + 184
  LU = POINT(ix - 1, iy - 1)
  RU = POINT(ix + 1, iy - 1)
  LD = POINT(ix - 1, iy + 1)
  RD = POINT(ix + 1, iy + 1)
  PSET (ix, iy + 100), (LU OR RD) AND (RU OR LD)
NEXT: NEXT
LINE (x, y)-(x + 184, y + 48), 15, BF
FOR iy = y + 100 TO y + 148: FOR ix = x TO x + 184
  LU = POINT(ix - 1, iy - 1)
  RU = POINT(ix + 1, iy - 1)
  LD = POINT(ix - 1, iy + 1)
  RD = POINT(ix + 1, iy + 1)
  PSET (ix, iy - 100), (LD AND RU) OR (LU AND RD) OR POINT(ix, iy)
NEXT: NEXT
 LINE (x, y + 100)-(x + 184, y + 148), 15, BF
 LINE (150, 160)-(500, 180), 0, B
 LINE (0, 0)-(47, 15), 15, BF
 PCOPY 1, 0

Тестирование выполнено в программе QB64 ( Скачать )

Leave a Comment