New Want to Write for Computaholics ? if Yes Contact us at "contact@computaholics.in"

c program to print given number pattern

Write a c program to print given number pattern
666666
55555
4444
333
22
1

#include <stdio.h>

int main()
{
    int k,j;
    for(j=6;j>=1;j--)
    {
        for(k=1;k<=j;k++)
        {
            printf("%d",j);
        }
        printf("\n");
    }
}
Copyright © C Program | Java | OpenGL Programming | Hadoop at Computaholics