Search C Program | nimishsoft@gmail.com

Number Pattern - 10

5
44
333
2222
11111

#include <stdio.h>

int main()
{
    int i, j;
    for(i=5;i>=1;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

11 comments:

  1. this code is wrong.

    ReplyDelete
    Replies
    1. code is working fine, check the following link of codepad.org for output.
      http://codepad.org/HASbQFOy

      Delete
  2. for(i=1;i<=n;i++)
    {
    for(j=1;j<=i;j++)
    pf("%d",n);
    n--;
    pf("\n");
    }

    ReplyDelete
  3. Int I,j;
    For(i=5;I>=1;i--)
    {
    For(j=i;j<=5;j++)
    {
    Printf("%d",I);
    }
    Printf("\n");
    }

    Is this code true ??

    ReplyDelete
  4. This code is wrong
    The right code is:-


    #include

    int main()
    {
    int i,j;
    for(i=5;i>=1;i--)
    {
    for(j=i;j<=5;j++) {

    printf("%d",i); }

    printf("\n");

    }

    return 0;
    }

    ReplyDelete
  5. How to print this pattern ?
    1
    1 1
    1 2 1
    1 2 2 1

    ReplyDelete
  6. 7
    6 6
    14 14 14
    12 12 12 12
    21 21 21 21 21

    enter code

    ReplyDelete