Pattern #3

pattern


Program:

#include <stdio.h>


void main()

{

    int i, j;

    

    for(i=1;i<=5;i++)

    {

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

        {

            printf("%d",j);

        }

        printf("\n");

    }

}


Output:

1

12

123

1234

12345


Drafted on 🌏 by,

Jal


peace

Comments

Popular posts from this blog

C program to read and display book information using structure

Count positive, negative and zero values in an array

Maximum value from array