recent

program to print number pattern

Write a c program to print given number pattern:-
5
56
456
3456
23456
123456


#include <stdio.h>

int main()
{
    int k,j;
    for(j=6;j>=1;j--)
    {
        for(k=j;k<=6;k++)
        {
            printf("%d",k);
        }
        printf("\n");
    }
}

Powered by Blogger.