need help with a for loop
i need to condense this piece of code down by 10 characters and I cannot think of a way to do that. I cannot change any of the variable names and changing any of the loop contents will change the function of the program. Is there a way that I can repeat a pair of loops just once? Thanks to anyone who can help.
Code:
for (row = 0; row < height; row = row++){
for (col = 0; col < row; col = col++){
printf(" ");
}
for (col = 0; col < width; col = col++){
printf("X");
}
for (col = 0; col < width; col = col++){
printf(" ");
}
for (col = 0; col < width; col = col++){
printf("X");
}
printf("\n");
}