How to print this pattern in Java?
1
22
33
33
22
1
What are the steps in order to type the offer in BlueJ, applying iteration through looping statements
class Example
avoid fn()
int i, j, cn=1;
Technique.out.println(cn++);
for(i=1; i<=4; i++)
for(j=1; j<=2; j++)
Technique.out.print(cn);
if(i<=2)
cn++;
if(i>=2)
cn–;
Technique.out.println();
Technique.out.println(cn);
Leave a Reply
You must be logged in to post a comment.