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