Построить совокупность попарно связанных n точек с заданными координатами — QBasic(Бейсик)

DEFINT A-Z
CLS
INPUT "Kol-vo tochek : ", n
  f = FREEFILE
  OPEN "B", f, "Points.pix"
PRINT "Teper' koordinaty dlya kajdoi tochki v regime ekrana 12"
FOR i = 1 TO n
   PRINT "___ TOCHKA #"; i; "__"
   INPUT "X : ", x
   INPUT "Y : ", y
   PUT #f, , x
   PUT #f, , y
NEXT
  SCREEN 12
 SEEK #f, 1
 GET #f, , x
 GET #f, , y
FOR i = 1 TO n - 1
   GET #f, , x2
   GET #f, , y2
      LINE (x, y)-(x2, y2), 15
   x = x2: y = y2
NEXT
  CLOSE f
  KILL "Points.pix"
  WHILE INKEY$ = "": WEND