Advertisement
Guest User

Untitled

a guest
Aug 14th, 2014
786
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.37 KB | None | 0 0
  1.     public static void task3() {
  2.         int[][] matrixCalc = new int[2][2];
  3.         int Calc = 0;
  4.         for (int i = 0; i < 2; i++) {
  5.             for (int j = 0; j < 2; j++) {
  6.                 matrixCalc[i][j] = (int)(Math.random() * 100);
  7.                 System.out.print(matrixCalc[i][j] + "\t");
  8.                 Calc+= matrixCalc[i][j];
  9.             }
  10.             System.out.println();
  11.         }
  12.         System.out.println(Calc);
  13.         System.out.println();
  14.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement