Advertisement
Guest User

Zad3

a guest
Nov 25th, 2017
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.43 KB | None | 0 0
  1. public class Main {
  2.     public static void main(String[] args) {
  3.  
  4.         int[][] tab = {
  5.                 {1, 0, 0, 0, 0},
  6.                 {0, 1, 0, 0},
  7.                 {0, 0, 1}
  8.         };
  9.         int[] tmp = new int[12];
  10.         int t = 0;
  11.         for (int i =0;i< tab.length;i++){
  12.             for (int j = 0; j < tab[i].length;j++){
  13.                 tmp[t] = tab[i][j];
  14.                 t++;
  15.             }
  16.         }
  17.     }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement