способом 1 ---непосредственно в тексте программы
способом 2----случайными числами
от 0 до 1;
от 1 до 6;
диапазон от -47 до 10
Способ 1
DIM a(5, 5)
FOR i = 1 TO 5
FOR j = 1 TO 5
PRINT "vvedite a("; i; ","; j; ")=";
INPUT "", a(i, j)
NEXT j
NEXT i
PRINT "massiv"
FOR i = 1 TO 5
FOR j = 1 TO 5
PRINT a(i, j);
NEXT
PRINT
NEXT
Способ 2 для диапазона 0..1
DIM a(5, 5)
RANDOMIZE TIMER
FOR i = 1 TO 5
FOR j = 1 TO 5
a(i, j) = RND
NEXT j
NEXT i
PRINT "massiv"
FOR i = 1 TO 5
FOR j = 1 TO 5
PRINT a(i, j);
NEXT
PRINT
NEXT
для 1..6
DIM a(5, 5)
RANDOMIZE TIMER
FOR i = 1 TO 5
FOR j = 1 TO 5
a(i, j) = INT(RND * 6) + 1
NEXT j
NEXT i
PRINT "massiv"
FOR i = 1 TO 5
FOR j = 1 TO 5
PRINT a(i, j);
NEXT
PRINT
NEXT
для -47 .. 10
DIM a(5, 5)
RANDOMIZE TIMER
FOR i = 1 TO 5
FOR j = 1 TO 5
a(i, j) = INT(RND * 58) - 47
NEXT j
NEXT i
PRINT "massiv"
FOR i = 1 TO 5
FOR j = 1 TO 5
PRINT a(i, j);
NEXT
PRINT
NEXT
Тестирование выполнено в программе QB64 ( Скачать )