Answers for "1 12 123 1234 12345 java code"

0

1 12 123 1234 12345 java code

import java.util.Scanner;
public class RightTriangleNumberPatterns 
{
	public static void main(String[] args) 
	{
		int i, j, n;
		System.out.print("Input number of rows : ");
		Scanner in = new Scanner(System.in);
		n = in.nextInt();
		for (i = 1; i <= n; i++) 
		{
			for (j = 1; j <= i; j++)
				System.out.print(j);
			System.out.println("");
		}
	}
}
Posted by: Guest on May-20-2021

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language