Submission

Status:
-----

Score: 0

User: akuyga1

Problemset: หินงอก

Language: c

Time: 0.020 second

Submitted On: 2024-10-08 15:32:18

#include <stdio.h>

int main() {
    int N;
    scanf("%d",&N);
    int A[N],max=0;
    for(int i=0;i<N;i++){scanf("%d",&A[i]);if(A[i]>max)max=A[i];}
    for(int y=0;y<max;y++){
        for(int i=0;i<2*A[i];i++){//tell the ith of pole
        {for(int x=0;x<A[i];x++){
            if(x==y)printf("\\");
            else printf(" ");
         //descending   
        }
        for(int x=0;x<A[i];x++){
            if(x==A[i]-y-1)printf("/");
            else printf(" ");
         //ascending   
        } 
        }
}
        printf("\n");
    }
    return 0;
}