Computer Science, asked by wadewilson3781, 1 year ago

Write a program to print the following pattern- 1)55555 54444 54333 54322 54321

Answers

Answered by siddhartharao77
1
#include <stdio.h>
#include<conio.h> 
void main()
 { 
int a, b, c, d; 

 clrscr(); 

printf("Enter rows: ");

  scanf("%d", &a);

  printf("Enter columns: ");

  scanf("%d", &b);

  printf("\n");

  for(c=1; c<=a; c++) 
 { 
for(d=b; d>b-c; d--) 

printf("%d", d); 
 } 
 for(d=1; d<=b-c; d++) 
 { 
printf("%d", (a - c + 1));
  } 
printf("\n"); 

 printf("\n");
   } 
 getch();
}



Hope this helps!
Similar questions