C Programming
Computer Programming

Program in C to Display the number pattern



Write a Program in c to display the following Pattern

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

\* C Program to display the numbers pattern *\

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

int   i, j, r ;
printf(" Enter the Number of row : ") ;
scanf("%d ", & r) ;
printf("\n Pattern are : \n\n") ;
for (  i = 1 ; i < = r ; i++ )
{

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

printf(" %d", j) ;

}
printf(" \n ") ;

}
return ( 0 );

}

Output of Program :

Output of Program in C to print the numbers pattern