new programmer needs a bit of help
I have to modify the program
public class stars
{
public static void main ( String [] args)
{
final int maxrows = 10;
for (int row = 1; row <= maxrows; row++)
{
for (int star = 1; star <= row; star++)
System.out.print("*");
System.out.println();
}
}
}
Which displays
*
**
***
... (for 10 rows)
to display a diamond:
*
***
*****
******* <-- This should be a diamond, but for
********* some reason its not beingdisplayed
*********
*******
*****
***
*
all with using for loops (or for the most part).
I am frustrated and it seems like my mind clouds over when i try to envision how this should work, can someone please do me a favor and help me
:) Thanks