Java program to print pattern 12345 6789 101112 1314 15
Answers
Answered by
12
Answer:
import java.util.Scanner;
public class Edureka
{
public static void main(String[] args) {
int i, j, k = 1;
for (i = 1; i <= 5; i++) {
for (j = 1; j< i + 1; j++) {
System.out.print(k++ + " ");
}
System.out.println();
}
}
}
Similar questions