
Pl sir make a program which generate the following output on pop up menu. 1 12 123 1234 12345 123456 1234567 12345678 123456789

Java Print Pattern
1
12
123
1234
12345
123456
1234567
12345678
123456789
public class PatternExample{
public static void main(String[] args){
for(int i=1;i<=9;i++){
for(int j=1;j<i+1;j++){
System.out.print(j);
}
System.out.println();
}
}
}
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.