Search C Program | nimishsoft@gmail.com

Number Pattern - 6

12345
2345
345
45
5

#include <stdio.h>

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

19 comments:

  1. Replies
    1. python program:
      n=int(input("Enter a number: "))
      for i in range(1,n+1):
      for a in range(i,n+1):
      print(a,end=" ")
      print()

      Delete
  2. Java code :
    int va = 1;
    for(int i=5;i>=1;i--){
    for(int j=1;j<=i;j++){
    System.out.print(j+va-1);
    }
    System.out.println();
    va++;
    }

    ReplyDelete
  3. int i,j,n,k=1;
    scanf("%d",&n);
    for(i=n;i>=1;i--)
    {
    for(j=1;j<=i;j++)
    {
    if(j>n)
    break;
    printf("%d",j);
    }
    printf("\n");
    k++;
    n--;
    }

    ReplyDelete
  4. #include
    #include
    main()
    {
    int i,j;
    for(i=1;i<=5;i++)
    {
    for(j=i;j<=5;j++){

    printf("%d",j);

    }

    printf("\n");


    }
    getch();
    }

    ReplyDelete
  5. #include

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

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

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

    return 0;
    }

    ReplyDelete
  6. #include

    int main(void) {
    // your code goes here
    int i,j,n,k;
    scanf("%d",&n);
    for(i=1;i<=n;i++)
    {
    k = i;
    for(j=n;j>=i;j--)
    {
    printf("%d",k);
    k++;
    }
    printf("\n");
    }
    return 0;
    }

    ReplyDelete
  7. #include
    #include
    void main()
    {
    int r,c;
    clrscr();
    for(r=1;r<=5;r++)
    {
    for(c=1;c<=5;c++)
    {
    printf("%d",c);
    }
    printf("\n");
    }
    getch();
    }

    // r is a stands for row and c is a stands for column.

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

    ReplyDelete
  9. In C++ language;

    #include
    using namespace std;

    int main(){
    int n;
    cin >> n;
    int i = 1;
    while(i<=n){
    int j = i;
    while(j<=n){
    cout << j;
    j++;
    }
    cout << endl;
    i++;
    }
    }

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

    plzz code

    ReplyDelete
  11. I would like to thank you for literally saving my assignment.

    ReplyDelete