\* 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 = 1 ; i < = n ; i++ )
{
for ( j = 1 ; j < = ( 2 * i )-1 ; j++ )
{
if (j % 2 == 0 )
printf(" * ") ;
else
printf(" %d " , i) ;
}
printf(" \n ") ;
}
for ( i = n ; i >= 1 ; i-- )
{
for ( j = ( 2 * i ) - 1 ; j >= 1 ; j-- )
{
if (j % 2 == 0 )
printf(" * ") ;
else
printf(" %d " , i) ;
}
printf(" \n ") ;
}
return ( 0 );
}