Please help with this method!
Write a public static method named starPrinter that will take an int as a parameter and
print lines of stars as shown below.
The header of the method will be public static void starPrinter(int n) .
e.g.
If the value of n is 5, then the method should print
*
***
*****
*******
*********
If the value of n is 3, then the method should print
*
***
*****
Please help!
Re: Please help with this method!
It actually has to look like pyramid as opposed to evenly stacked
" *
" ***
" *****
1 Attachment(s)
Re: Please help with this method!
A picture of how it is supposed to look is attached below
Re: Please help with this method!
Re: Please help with this method!
So what part of that is giving you trouble? We aren't going to write the code for you.
If you're having trouble with the algorithm, consider how you would write out the pattern by hand, character by character, line by line, using spaces and stars. Think about how the number of spaces and stars changes from line to line.
Technical skill is mastery of complexity, while creativity is mastery of simplicity...
E. C. Zeeman