Problem 33: Number Art

Write a program to print the following output using loop-
1 2 3 4 5
1 2 3 4
1 2 3
1 2
1

 

2,195 total views, 2 views today

Comments

comments

2 thoughts on “Problem 33: Number Art”

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

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

Leave a Reply

Your email address will not be published.