How to print Floyd’s Triangle

This is the first solution to print the Floyd’s Triangle. The program expects the number of rows as input from the user. The logic displays that many number of rows as per the Floyd’s Triangle pattern of numbers in each row.

import java.util.Scanner;

public class Traingles{

	public static void main(String[] args) {

		int numToDisp=1;
		System.out.println("Display pattern of the numbers - Floyd's Triangle");
		System.out.println("Enter number of levels (or Rows) to display=");
		Scanner inpInt=new Scanner (System.in);
		int rowsCnt=inpInt.nextInt();

		/*The nested for loop taking care of printing the numToDisp value along with space.
		 * The outer loop takes care of level increment, and jumping to next line */
		for (int i=1;i<=rowsCnt;i++) {
			for(int j=1;j<=i;j++)
				System.out.print(numToDisp++ + " ");
			System.out.println();
		}
		inpInt.close();
	}
}
Output:
Display pattern of the numbers - Floyd's Triangle
Enter number of levels (or Rows) to display=
8
1 
2 3 
4 5 6 
7 8 9 10 
11 12 13 14 15 
16 17 18 19 20 21 
22 23 24 25 26 27 28 
29 30 31 32 33 34 35 36