Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Matrix {
- public static void main(String[] args) {
- Scanner scanner = new Scanner (System.in);
- int number = scanner.nextInt();
- for (int i = 1; i <= number; i++) {
- for (int j = i; j <number + i; j++) {
- System.out.print(j + " ");
- }
- System.out.println();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment