I have to print the following pattern using for loop only.
![Required pattern](https://i.stack.imgur.com/roxKo.png)

I have written the following code which gives me till the the numbers increment. How can I decrement then in the other half.

```
#include<stdio.h>

int main(void)
{
    int x,r;
    for(r=1;r<5;r++)
    {
        for(x=3;x>=r;x--)
        {
            printf(" ");
        }

        for(x=1;x<=r;x++)
        {
            printf("%d",x);
        }

        printf("\n");
    }
    return 0;
}

```