@C-Noob: I think I can use GetInt() because I have a pre-programmed library in my linux system.
@Tclausex: Thank you for answering! You're absolutely right in that my second inner loop cannot include row. However, I don't understand what is wrong with my boolean test expression in my for() loop; the expression in my first inner loop will evaluate to true because row will eventually reach x -1 (since row increases by 1 every time).
I'm trying to break down the nested loop into simplified steps and I have:
I don't understand why when I run the simplified code, D does not print.
printf("Insert an integer less than 24: ");
int x = GetInt();
// to get the spaces right, where D is equivalent to a space
for (c = (x-1); c == 0; c--)