Answer to Question #843 in Java | JSP | JSF for Dani
I have to write a program so the user can input the size of a triangle, 1-50, and then output the triangle with asterisks. The user's input is the middle of the triangle. For example, if they input 3, it looks like this:
I need to use nested for loops. So far i did the for loop for the top of the triangle:
for(row = 1; row <= size; row++)
for(col = 1 ; col <= row ; col++)
Now i need to do the for loop for the bottom half and cannot figure it out.