180 shifted trg

 #include <stdio.h>


int main() {

    // Write C code here

    int n;

    printf("No of elements : ");

    scanf("%d", &n);

    

    int i , j ;

    for (i=1;i<=n;i++){

        for (j=1;j<=(n-i);j++){

            printf(" ");

        }

        for (j=(n-i+1);j<=n;j++){

            printf("*");

        }

           

        printf("\n");

    }

    return 0;

    

}

    *

   **

  ***

 ****

*****

Comments

Popular posts from this blog

Sum of Even Numbers till N

Find the Runner-Up Score!

Print All Substrings