Computer Science, asked by arijitmondal541, 11 months ago


1. Write program to generate the following patterns using iteration (loop) statements:
54321
5432
543
54​

Answers

Answered by 10shrey
0

Answer:

#include <stdio.h>

#include <conio.h>

int main()

{

   int i,j,rows;

   printf("Enter the number of rows: ");

          scanf("%d",&rows);

          for(i=1; i<=rows-1; i++){

             for(j=rows; j>=i; j--){

              printf("%d",j);

          }

          printf("\n");

          }

getch();

   return 0;

}

Explanation:

i have written the program in c language . here i used i and j variable where i represent row and j represent column.

Similar questions