Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*Создать двумерный массив из 8 строк по 5 столбцов в каждой из
- случайных целых чисел из отрезка [10;99]. Вывести массив на экран.
- */
- public class DvumerniyMassiv {
- public static void main(String[] args) {
- int[][] m = new int[8][5];
- for (int i = 0; i < m.length; i++) {
- for (int j = 0; j <m[i].length ; j++) {
- m[i][j] = (int) ((Math.random() * 90) +10);
- }
- }
- for (int i = 0; i < m.length; i++) {
- System.out.println();
- for (int j = 0; j < m[i].length; j++) {
- System.out.print(m[i][j] + " ");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement