Nah, this program (if it ever completes) is as ugly as it is, so better print all rows like this:
[code=java]
System.out.prin tln("|||||".sub string(0, row1));
System.out.prin tln("|||||".sub string(0, row2));
System.out.prin tln("|||||".sub string(0, row3));
System.out.prin tln("|||||".sub string(0, row4));
System.out.prin tln("|||||".sub string(0, row5));
[/code]
It would save you all those identical loops.
kind regards,
Jos
[code=java]
System.out.prin tln("|||||".sub string(0, row1));
System.out.prin tln("|||||".sub string(0, row2));
System.out.prin tln("|||||".sub string(0, row3));
System.out.prin tln("|||||".sub string(0, row4));
System.out.prin tln("|||||".sub string(0, row5));
[/code]
It would save you all those identical loops.
kind regards,
Jos
Comment