Search C Program

Loading...

Number Pattern - 12

11111
2222
333
44
5

#include <stdio.h>

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

    return 0;
}

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

2 comments:

  1. void generate6(int n)
    {
    static int a;
    a=n;
    for(int i1=1;i1<=n;i1++)
    {
    cout<<endl;
    for(int j1=1;j1<=a;j1++)
    {
    cout<<i1;
    }
    --a;
    }
    }

    ReplyDelete
  2. #include
    int main()
    {
    int i,j;
    for(i=1;i<=5;i++){
    for(j=i;j<=5;j++)
    {
    printf("%d",i);
    }
    printf("\n");
    }
    return 0;
    }

    ReplyDelete