1 12 123 1234 12345 java code

Solutions on MaxInterview for 1 12 123 1234 12345 java code by the best coders in the world

showing results for - "1 12 123 1234 12345 java code"
Maya
16 Jul 2019
1import java.util.Scanner;
2public class RightTriangleNumberPatterns 
3{
4	public static void main(String[] args) 
5	{
6		int i, j, n;
7		System.out.print("Input number of rows : ");
8		Scanner in = new Scanner(System.in);
9		n = in.nextInt();
10		for (i = 1; i <= n; i++) 
11		{
12			for (j = 1; j <= i; j++)
13				System.out.print(j);
14			System.out.println("");
15		}
16	}
17}