When you did it on paper, (because we know you did this first, because it makes writing the code easier), did you move to a new line and then write *; or did you write * and then move to a new line?...
Type: Posts; User: jps
When you did it on paper, (because we know you did this first, because it makes writing the code easier), did you move to a new line and then write *; or did you write * and then move to a new line?...
Back to the drawing board. (or pencil and paper)
Hint, you do not need two lines that say System.out.print("*");
Come up with how to do it first, then translate that solution to code
System.out.println();
is the first thing inside the loop, so it is the first thing that happens
Put the System.out.println(); somewhere else.
If you worked this out on paper, step by step, it...
...and describe what isn't working means.
for(int i = 0; r < n; i++) {
Where does the 'r' come from?
Please use code tags when posting code, help can be found here