It happens that we were given the task of creating a Main that can print the following figure with the use of "for":
@
@@@
@@@@@ en el caso n=3.
@@@
@
@
@@@
@@@@@
@@@@@@@ en el caso de n=4.
@@@@@
@@@
@
and so on successively ... We were given the following method that meets the "half" ie:
@
@@@
@@@@@
@@@@@@@ en el caso de n=4.
for(int i=1;i<n;i++){
for(int j=1;j<=n;j++){
System.out.print(" ");
}
for(int j=1;j<=n*2;j++){
System.out.print("@ ");
}
}
}
Any ideas?