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