Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR C

number pattern in c

/**
 * C program to print number pattern
 */

#include <stdio.h>

int main()
{
    int i, j, N;

    printf("Enter N: ");
    scanf("%d", &N);

    for(i=N; i>=1; i--)
    {
        for(j=1; j<=i; j++)
        {
            printf("%d", i);
        }

        printf("
");
    }

    return 0;

}
Source by codeforwin.org #
 
PREVIOUS NEXT
Tagged: #number #pattern
ADD COMMENT
Topic
Name
2+5 =