Pattern #1

pattern


Program:

#include <stdio.h>


void main()

{

    int i,j,k=5;

    

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

    {

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

        {

            printf("%d",k);

            k--;

        }

        printf("\n");

        k=5;

    }

}


Output:

5

54

543

5432

54321


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