C code for this pattern 1 22 22 333 333 333 : I want to write a code in C for this pattern:
1
22
22
333
333
333
..and I need help. Thank you! :)
This is what I've tried:
int n,i,j;
    scanf("%d",&n);

    for(i=1;i<=n;i++)
    {printf("\n");
        for(j=1;j<=i;j++)
        {

        printf("%d",i);
        }
    }