I'm creating a simple program that asks the user to input the size of a box and then displays the box using asterisks. I'm have a problem with the rows printing. Here is the code that I have so far...
Code:#include <stdio.h> int main (int argc, const char * argv[]) { int column, size, row; column = 0; row = 0; printf("Enter size of box:"); scanf("%d", &size); while (row != size) { row = size - 1; row++; printf("*", row); while (column != size) { column++; printf("*", column); printf("\n"); } } return 0; }
result:
Enter size of box:2
**
*
How do I fix this?