Hi - I'm having a hard time figured out how to print the triangle shape below using loops. I did the two previous triangles with no issue but have no idea how to get the spaces in there. I'm really confused and would appreciate any help.
*
**
***
****
*****
******
*******
********
*********
**********
public static void main (String[]args)
{
final int MAX_ROWS = 10;
for (int row = 10; row <= MAX_ROWS; row--)
{
for (int star = 1; star <=MAX_ROWS; star++)
System.out.print ("*");
{
for (int space = 1; space<=MAX_ROWS; space++)
System.out.print(" ");
}
System.out.println();
}
}
}