|
@ -218,18 +218,18 @@ void befuellenDesWeihnachtsbaumsMitPlus(char arr[], int maxBreite, int zeilen){ |
|
|
|
|
|
|
|
|
int arrayGroesse = maxBreite * zeilen; |
|
|
int arrayGroesse = maxBreite * zeilen; |
|
|
int mitteDesBaums = maxBreite / 2; |
|
|
int mitteDesBaums = maxBreite / 2; |
|
|
int mengeX = 1; |
|
|
|
|
|
|
|
|
int mengeDerXInDerZeile = 1; |
|
|
|
|
|
|
|
|
for(int i = zeilen; i > 0; i--){ |
|
|
for(int i = zeilen; i > 0; i--){ |
|
|
|
|
|
|
|
|
int position = mitteDesBaums -1; |
|
|
int position = mitteDesBaums -1; |
|
|
|
|
|
|
|
|
while(position < mitteDesBaums-1 + mengeX){ |
|
|
|
|
|
|
|
|
while(position < mitteDesBaums-1 + mengeDerXInDerZeile){ |
|
|
arr[position++] = '+'; |
|
|
arr[position++] = '+'; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
mitteDesBaums += (maxBreite -1); |
|
|
mitteDesBaums += (maxBreite -1); |
|
|
mengeX += 2; |
|
|
|
|
|
|
|
|
mengeDerXInDerZeile += 2; |
|
|
} |
|
|
} |
|
|
arr[arrayGroesse] = '\0'; |
|
|
arr[arrayGroesse] = '\0'; |
|
|
} |
|
|
} |
|
|