Print the output in java:
152535455
142434454
132334353
122324252
121314151
Answers
Answered by
0
Answer:
public class Test {
public static void main(String [] args) {
int i=5;
while (i!=0) {
for(int j=1;j<6;j++) {
System.out.print(j); if(i!=j){
System.out.print(i);
}
}
i--;
System.out.print("\n");
}
}
}
Similar questions