Search C Program

Loading...

Number Pattern - 3

1
21
321
4321
54321

#include <stdio.h>

int main()
{
    int i, j;
    for(i=1;i<=5;i++)
    {
        for(j=i;j>=1;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. What will be the code for the pattern given below?

    1 2 3 4 5
    2 1 2 3 4
    3 2 1 2 3
    4 3 2 1 2
    5 4 3 2 1

    ReplyDelete
    Replies
    1. http://cbasicprogram.blogspot.in/2013/01/number-pattern-51.html

      Delete
  2. Alternate Code for the same pogram?

    ReplyDelete