Исправить код лабиринта - QBasic

Формулировка задачи:

DO
K$ = INKEY$
IF K$ = "K" THEN GOSUB LABIRINT
LOOP
LABIRINT:
OPEN "WWW.BAS" FOR APPEND AS #1
PRINT #1, "A = INT(RND(1)*2)"
PRINT #1, "IF A = 1 THEN LINE (10,10)-(50,10),1"
CLOSE #1
PRINT "WOD"
RETURN
 
'WWW.BAS
'SCREEN 13
'RANDOMIZE TIMER

Код к задаче: «Исправить код лабиринта - QBasic»

textual
SCREEN 13
RANDOMIZE TIMER
LINE (5, 5)-(225, 145), 1, B
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (25, 5)-(25, 25), 1
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (45, 5)-(45, 25), 1
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (65, 5)-(65, 25), 1
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (85, 5)-(85, 25), 1
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (105, 5)-(105, 25), 1
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (125, 5)-(125, 25), 1
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (145, 5)-(145, 25), 1
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (165, 5)-(165, 25), 1
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (185, 5)-(185, 25), 1
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (205, 5)-(205, 25), 1
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (225, 5)-(225, 25), 1
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (5, 25)-(25, 25), 1
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (25, 25)-(45, 25), 1
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (45, 25)-(65, 25), 1
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (65, 25)-(85, 25), 1
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (85, 25)-(105, 25), 1
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (105, 25)-(125, 25), 1
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (125, 25)-(145, 25), 1
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (145, 25)-(165, 25), 1
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (165, 25)-(185, 25), 1
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (185, 25)-(205, 25), 1
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (205, 25)-(225, 25), 1
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (25, 25)-(25, 45), 1
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (45, 25)-(45, 45), 1
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (65, 25)-(65, 45), 1
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (85, 25)-(85, 45), 1
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (105, 25)-(105, 45), 1
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (125, 25)-(125, 45), 1
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (145, 25)-(145, 45), 1
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (165, 25)-(165, 45), 1
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (185, 25)-(185, 45), 1
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (205, 25)-(205, 45), 1
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (5, 45)-(25, 45), 1
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (25, 45)-(45, 45), 1
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (45, 45)-(65, 45), 1
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (65, 45)-(85, 45), 1
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (85, 45)-(105, 45), 1
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (105, 45)-(125, 45), 1
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (125, 45)-(145, 45), 1
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (145, 45)-(165, 45), 1
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (165, 45)-(185, 45), 1
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (185, 45)-(205, 45), 1
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (205, 45)-(225, 45), 1
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (25, 45)-(25, 65), 1
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (45, 45)-(45, 65), 1
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (65, 45)-(65, 65), 1
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (85, 45)-(85, 65), 1
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (105, 45)-(105, 65), 1
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (125, 45)-(125, 65), 1
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (145, 45)-(145, 65), 1
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (165, 45)-(165, 65), 1
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (185, 45)-(185, 65), 1
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (205, 45)-(205, 65), 1
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (5, 65)-(25, 65), 1
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (25, 65)-(45, 65), 1
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (45, 65)-(65, 65), 1
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (65, 65)-(85, 65), 1
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (85, 65)-(105, 65), 1
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (105, 65)-(125, 65), 1
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (125, 65)-(145, 65), 1
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (145, 65)-(165, 65), 1
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (165, 65)-(185, 65), 1
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (185, 65)-(205, 65), 1
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (205, 65)-(225, 65), 1
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (25, 65)-(25, 85), 1
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (45, 65)-(45, 85), 1
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (65, 65)-(65, 85), 1
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (85, 65)-(85, 85), 1
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (105, 65)-(105, 85), 1
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (125, 65)-(125, 85), 1
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (145, 65)-(145, 85), 1
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (165, 65)-(165, 85), 1
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (185, 65)-(185, 85), 1
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (205, 65)-(205, 85), 1
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (5, 85)-(25, 85), 1
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (25, 85)-(45, 85), 1
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (45, 85)-(65, 85), 1
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (65, 85)-(85, 85), 1
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (85, 85)-(105, 85), 1
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (105, 85)-(125, 85), 1
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (125, 85)-(145, 85), 1
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (145, 85)-(165, 85), 1
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (165, 85)-(185, 85), 1
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (185, 85)-(205, 85), 1
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (205, 85)-(225, 85), 1
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (25, 85)-(25, 105), 1
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (45, 85)-(45, 105), 1
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (65, 85)-(65, 105), 1
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (85, 85)-(85, 105), 1
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (105, 85)-(105, 105), 1
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (125, 85)-(125, 105), 1
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (145, 85)-(145, 105), 1
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (165, 85)-(165, 105), 1
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (185, 85)-(185, 105), 1
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (205, 85)-(205, 105), 1
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (5, 105)-(25, 105), 1
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (25, 105)-(45, 105), 1
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (45, 105)-(65, 105), 1
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (65, 105)-(85, 105), 1
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (85, 105)-(105, 105), 1
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (105, 105)-(125, 105), 1
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (125, 105)-(145, 105), 1
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (145, 105)-(165, 105), 1
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (165, 105)-(185, 105), 1
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (185, 105)-(205, 105), 1
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (205, 105)-(225, 105), 1
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (25, 105)-(25, 125), 1
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (45, 105)-(45, 125), 1
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (65, 105)-(65, 125), 1
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (85, 105)-(85, 125), 1
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (105, 105)-(105, 125), 1
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (125, 105)-(125, 125), 1
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (145, 105)-(145, 125), 1
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (165, 105)-(165, 125), 1
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (185, 105)-(185, 125), 1
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (205, 105)-(205, 125), 1
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (5, 125)-(25, 125), 1
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (25, 125)-(45, 125), 1
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (45, 125)-(65, 125), 1
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (65, 125)-(85, 125), 1
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (85, 125)-(105, 125), 1
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (105, 125)-(125, 125), 1
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (125, 125)-(145, 125), 1
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (145, 125)-(165, 125), 1
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (165, 125)-(185, 125), 1
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (185, 125)-(205, 125), 1
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (205, 125)-(225, 125), 1
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (25, 125)-(25, 145), 1
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (45, 125)-(45, 145), 1
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (65, 125)-(65, 145), 1
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (85, 125)-(85, 145), 1
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (105, 125)-(105, 145), 1
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (125, 125)-(125, 145), 1
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (145, 125)-(145, 145), 1
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (165, 125)-(165, 145), 1
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (185, 125)-(185, 145), 1
A = INT(RND(1) * 2)
IF A = 1 THEN LINE (205, 125)-(205, 145), 1
Эта работа вам не подошла?

Вы всегда можете заказать любую учебную работу у наших авторов от 20 руб.

9   голосов, оценка 3.889 из 5


СДЕЛАЙТЕ РЕПОСТ