Regarding your solution to 04_31.
Editing your code, like below, shows the same result:
#include <stdio.h>
int main () {
int a, b, x, y, step1, step2, counter1 = 4, counter2 = 1;
for (step1 = 0; step1 < 5; step1++) {
for (x = counter1; x > 0; x--) {
printf(" ");
}
for (y = 1 + (2 * step1); y > 0; y--) {
printf("*");
}
printf("\n");
counter1--;
}
for (step2 = 3; step2 > -1; step2--) {
for (a = counter2; a > 0; a--) {
printf(" ");
}
for (b = 1 + (2 * step2); b > 0; b--) {
printf("*");
}
printf("\n");
counter2++;
}
return 0;
}
Best Regards.
Regarding your solution to 04_31.
Editing your code, like below, shows the same result:
#include <stdio.h>
int main () {
}
Best Regards.