Answer:
public class PrintSquare {
public static void printSquare(int min, int max) {
for (int i = min; i <= max; i++) {
for (int j = 0; j < (max - min + 1); j++) {
if (i + j <= max)
System.out.print(i + j);
else
System.out.print(i+j - max + min - 1);
}
System.out.println();
}
}
public static void main(String[] args) {
printSquare(3, 6);
}
}
Step-by-step explanation: