Advertisement
Alex_Zuev

Untitled

Feb 28th, 2015
194
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.63 KB | None | 0 0
  1. package com.company;
  2.  
  3. /**
  4.  * Created by Alex on 28.02.2015.
  5.  */
  6. public class MasiveDual {
  7.     public static void main(String[] args) {
  8.         int  m[][]= new int[8][5];
  9.         int Max=0;
  10.         for (int i=0; i<m.length;i++){
  11.             for (int j=0;j<m[i].length;j++){
  12.                 m[i][j]=(int)(Math.random()*200-100);
  13.                 if (Max<m[i][j])
  14.                     Max=m[i][j];
  15.             }
  16.         }
  17.         for (int i=0;i<m.length;i++) {
  18.             for (int j = 0; j < m[i].length; j++) {
  19.                 System.out.print(m[i][j]+" ");
  20.             }
  21.             System.out.println();
  22.  
  23.         } System.out.println(Max);
  24.     }
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement