Printing Pattern Using Loops

  • + 0 comments

    include

    void main( ) { int n; printf("Give input"); scanf("%i",&n); for(int i=1; i <= 2*n-1;i++) { int k=1; for(int j=1;j <= 2*n-1; j++) { for(int m=1;mi) k --; if(j>=2*n-i+1) k --; break; } printf("%i ",n-k+1); } printf("\n"); } }