
the output must be
1
324
76589

Here is an example of pattern
1 2 3 4 5 6 7 8 9
Example:
public class NumberTriangle{
public static void main(String args[]){
int n=1;
for(int i=1;i<=5;i=i+2){
for(int j=1;j<=i;j++){
System.out.print(n);
n=n+1;
}
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.