Code for pattern 6

Code for pattern 6

1
23
456
78910


#include<stdio.h>
#include<conio.h>
void main()
{
    int i,j,l=1;
    for(i=1;i<=4;i++)
    {
        for(j=1;j<=i;j++)
        {
         printf("%d",l);
         l++;
        }
        printf("\n");
    }
    getch();
    }


Output



Comments

Popular posts from this blog

Code to check leap year