C Programming
Computer Programming

Program in C to display the number pattern



Write a Program in c to display the following Pattern :

5 5 5 5 5
4 4 4 4
3 3 3
2 2
1

\* C Program to display the number pattern *\

# include < stdio.h >
int   main( )
{

int   i, j, n, k = 1 ;
printf(" Enter the Maximum Number : ") ;
scanf("%d ", & n) ;
printf("\n Pattern are : \n\n") ;
for (  i = n ; i >= 1 ; i-- )
{

for (  j = i ; j >= 1 ; j-- )
{

printf("   %d " ,  i) ;

}
printf(" \n ") ;

}
return ( 0 );

}

Output of Program :

Output of Program in C to display the reverse number pattern