Untitled

mail@pastecode.io avatar
unknown
plain_text
10 days ago
359 B
1
Indexable
Never

#include <stdio.h>

int main()
{   
    int n;
    scanf("%d",&n);
    
    for(int i=0;i<2*n-1;i++){
        for(int j=0;j<(n+1)*(2*n-2)+1;j++){
            if(i==j%(2*n-2) || (i+j%(2*n-2)==2*n-2)){
                printf("*");
            }
            else{
                printf(" ");
            }
        }
        printf("\n");
    }

    return 0;
}
Leave a Comment