Решение на Java
package com.company;
public class Main {
public static void main(String[] args) {
int[][] mtr = new int[3][5];
//Заполнение
for (int i = 0; i < 3; ++i) {
for (int j = 0; j < 5; ++j) {
int num = (int) (Math.random() * (15 - (-10))) + -10;
mtr[i][j] = num;
}
//Вывод
System.out.print(mtr[i][j] + "\t");
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
Решение на Java
package com.company;
public class Main {
public static void main(String[] args) {
int[][] mtr = new int[3][5];
//Заполнение
for (int i = 0; i < 3; ++i) {
for (int j = 0; j < 5; ++j) {
int num = (int) (Math.random() * (15 - (-10))) + -10;
mtr[i][j] = num;
}
}
//Вывод
for (int i = 0; i < 3; ++i) {
for (int j = 0; j < 5; ++j) {
System.out.print(mtr[i][j] + "\t");
}
}
}
}