Search C Program | nimishsoft@gmail.com

Number Pattern - 36

1
212
32123
4321234

#include<stdio.h>

int main()
{
  int i,j;
  for(i=1;i<=4;i++)
  {
    for(j=i;j>1;j--)
      printf("%d",j);
    for(j=1;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


4 comments:

  1. #include
    void main()
    {
    int i,j;
    for(i=1;i<=4;i++)
    {
    for(j=i;j>=1;j--)
    {
    printf("%d",j);
    }
    for(j=2;j<=i;j++)
    {
    printf("%d",j);
    }
    printf("\n");
    }
    ]

    ReplyDelete
  2. #include
    #include
    #include

    int main(){

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

    ReplyDelete
  3. write a program that reads integers until the user stop. When the user stops entering numbers display the largest of all the numbers

    ReplyDelete