Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Scanner scanner = new Scanner(new File("C:/Temp/plik.txt"));
- int x = scanner.nextInt();
- int y = scanner.nextInt();
- int tab[][] = new int[x][y];
- for(int i = 0; i < x ; i++) {
- for(int j = 0; j < y ; j++) {
- int k = scanner.nextInt();
- tab[i][j] = k;
- }
- }
- for(int i = 0; i < x ; i++) {
- for(int j = 0; j < y ; j++) {
- System.out.printf("% 5d", tab[i][j]);
- }
- System.out.println();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement