Skip to content
Snippets Groups Projects
hol_invt_mir_rht_tri_str.c 482 B
Newer Older
/* holllow inverse mirriored Right triangle star pattern 
*****
 *  *
  * * 
   **
    *
*/

#include<stdio.h>

int main(){
    int num = 5 ;
     
    for (int i=num; i>=1;i--){
        for (int k = num ; k >= i ; k--){
            printf(" ");
        }
        for (int j=1 ;j<= i; j++){
            if ( i == num || j == num || i == j || j == 1){
                printf("#");
            }else {
                printf(" ");
            }
        }
        printf("\n");
    }
}