12345
23451
34512
45123
51234
all help is appreciated
[ATTACH]3731[/ATTACH]
edit: im not sure how to properly post the code on here as i have seen in other threads
|
|
|
tags.
public static void printSquare(int min, int max)
{
for (int line=0; line<max-min + 1; line++)
{
for (int a=min+line; a<=max; a++)
{
System.out.print(a);
}
[B][COLOR="red"]for (int b=min; b<min+line; b++)
{
System.out.print(b);
}[/COLOR][/B]
System.out.println();
}
}
for (int i = 0; i < 5 ; i++) {
for (int j = 0 ; j < 5; j++) {
System.out.print(1+(j+i)%5);
}
System.out.println();
}
0 members, 1 guests, 0 anonymous users