write a program to print the following pattern 4321 4322 4333 4444 in java
Answers
Answered by
0
Answer:
public class series {
public static void main (String args[]){
int in = 4; //change input
for(int i=1;i<=in;i++){
for(int a=in;a > in+1-i && i!=1;a--){
System.out.print(a);
}
for(int j=in;j>=i;j--){
System.out.print(in+1-i);
}
System.out.println();
}
}
}
Similar questions