CLEAR ALL
n=9
DIM b(n,n)
FOR i=0 TO n:b(i,i)=i:b(i,n-i)=i:NEXT i
FOR y=0 TO n
    FOR x=0 TO n
        INK RGB(255,255,255):IF (x=0 AND y=0) OR (x=0 AND y=n) OR b(x,y)>0 THEN INK RGB(255,0,0)
        PRINT b(x,y);TAB((x+1)*10);
    NEXT x
    PRINT
NEXT y
