|This topic is basically the same as http://www.computing.net/answers/pr... .|
I've read through the help, and I spotted this code.
for (i = 4; i >= 0; i--)
for (j = 4;j >= i; j--)
I have an assignment similar to this, but it prompts the user to input a value. I am having a few trouble though, the pattern isn't coming out like how it's suppose to.
int max, rownum, starnum;
printf("Enter width: ");
for (rownum = 1 ; rownum <= max ; rownum++)
for (starnum = 1 ; starnum <= rownum ; starnum++)
I've looked at the code in the first, and my code. It's a similar output (well suppose to rather), but the for loop value is decreasing whereas mine is increasing. I'd figure it would be the same but it's not giving me the result that I want. Is there a problem in the code I have?