Witam, mam problem z odwróceniem takiej piramidy, oto kod oraz zdjęcie:
#include <stdio.h>
int main()
{
int h=10;
for(int y = 0; y < h; y++)
{
for(int x = 0; x < h-y-1; x++)
{
printf(" ");
}
for(int x = 0; x <2*y+1; x++)
{
if(y==0||((x==0||x==2*y)&&y==h-1)){
printf("*");
}else if(x==0){
printf("/");
}else if(x==y*2){
printf("\\");
}else if(y==h-1&&(x!=0||x!=y*2)){
printf("-");
}
else{
printf(" ");
}
}
printf("\n");
}
return 0;
}
i potrzebuję odwrócić tą piramidę do góry nogami.
Z góry dziękuję za pomoc :D