Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Override
- public void task9() {
- final int N = new Scanner(System.in).nextInt();
- System.out.println(IntStream.range(1, N * N + 1)
- .mapToObj(i -> i + (i % N == 0 ? "\n" : "\t"))
- .collect(Collectors.joining())
- );
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement