## C Program to draw Number pattern III

### Description

```Input:
5
Output:
1
121
12321
1234321
123454321```

### Solution

```#include<stdio.h>
int main()
{
int i,j,n,k,step=1,num;
printf("enter row size:");
scanf("%d",&n);
for(i=1;i<=n;i++)
{
num=1;
for(k=1;k<=n-i;k++)
{
printf(" ");
}

for(j=1;j<=step;j++)
{
printf("%d",num);
if(j<i)
{
num++;
}
else
{
num--;
}

}

step+=2;
printf("\n");
}
return 0;
}```

We are Teaching "Web Development using Python" through Online.

View Tutor Profile and Course Syllabus

### Explanation

`Refer Video tutorial`

#### Author - Ramesh P Natarajan

Software Developer and Technology Trainer, very much passionate in the field of Software Application Development, Machine Learning and Search Engine Optimization.

Write to: [email protected]

### Interesting Pattern Programs: for more Patterns

```Input:
5
Output:
*
**
***
****
*****
****
***
**
*Solution```
```Input:
5
Output:
*
***
*****
*******
*********
*******
*****
***
*Solution```
```Input:
5
Output:
*        *
**      **
***    ***
****  ****
**********Solution```
```Input:
5
Output:
*       *
**     **
***   ***
**** ****
*********Solution```
```Input:
5
Output:
*       *
**     **
***   ***
**** ****
*********
**** ****
***   ***
**     **
*       *Solution```
```Input:
5
Output:
*********
*******
*****
***
*
***
*****
*******
*********Solution```