RosettaCodeData/Task/Create-a-two-dimensional-ar.../XBasic/create-a-two-dimensional-ar...

15 lines
342 B
Plaintext

PROGRAM "Create a two-dimensional array at runtime"
VERSION "0.0001"
DECLARE FUNCTION Entry ()
FUNCTION Entry ()
i$ = INLINE$("Enter one positive integer: ")
j$ = INLINE$("Enter other positive integer: ")
i = SSHORT(i$)
j = SSHORT(j$)
DIM a[i, j]
a[i, j] = i * j
PRINT "a("; STRING(i); ", "; STRING(j); ") ="; a[i, j]
END FUNCTION