Inverted half pyramid 180' rotate pattern in c and java language.

■》Code link -> click πŸ‘‡πŸ‘‡πŸ‘‡πŸ‘‡

https://www.programiz.com/online-compiler/5lOrHcy9pXgc6


■ Program->

#include<stdio.h>

#include<conio.h>

void main()

{

int n;

printf("enter no. of row=");

scanf("%d",&n);

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

for(int j=1; j<i; j++){

printf(" ");

}

for(int j=n; j>=i; j--){

printf("*");

}

printf("\n");

}

getch();

}

■》Output->

enter no. of row=> 5

*****

  ****

    ***

      **

        *


Comments

Popular posts from this blog

Introduction of java Programming language.

Stack data structure.