Search C Program

Number Pattern - 4

5
54
543
5432
54321

#include <stdio.h>

int main()
{
    int i, j;
    for(i=5;i>=1;i--)
    {
        for(j=5;j>=i;j--)
        {
            printf("%d",j);
        }
        printf("\n");
    }

    return 0;
}


Related Links:
- More Number Pattern Programs
- Star Pattern Programs in C
- Alphabet Pattern Programs in C
- Series Programs in C

3 comments:

  1. #include

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

    printf("Enter the number of rows : ");
    scanf("%d",&r);

    for(i=r;i>=1;i--)
    {
    for(j=r;j>=i;j--)
    {
    printf("%d",j);
    }
    printf("\n");
    }

    return 0;
    }

    ReplyDelete
  2. #include
    int main()
    {
    int i, j, k=5;
    for(i=1;i<=5;i++)
    {
    int u=5;
    for(j=k;j<=u;j++)
    {
    printf("%d\t",j);

    }
    k--;
    //i--;
    printf("\n");
    }
    }

    ReplyDelete