Saturday, October 31, 2020

C program for the inverse pyramid

* * * * *

 * * * *

  * * *

   * *

    * 


#include <stdio.h>

int main()

{

    int i,j;

    for(i=1;i<=5;i++)

    {

        for(j=2;j<=i;j++)

        {

            printf(" ");

        }

        for(j=5;j>=i;j--)

        {

            printf("* ");

        }

        printf("\n");

    }

}

No comments:

Post a Comment

Self-Respect vs. Ego ❤️ | Learning When to Give, Let Go & Choose Solitude ✨

  https://youtube.com/shorts/1GJpFnKyU88 So, I think I learned the difference between the self-respect and the ego in terms of making effort...