Wap to show pattern | Sololearn: Learn to code for FREE!

0

Wap to show pattern

cba ba a

4/19/2018 8:46:29 AM

mohd shahnawaz

1 Answer

New Answer

0

/**************** Here is the required Code. I hope it will help You ******************************/ #include<stdio.h> int main() { char ch; int num; printf("Enter Number : "); scanf("%d",&num); printf("\nPattern is : \n"); for(int i=num;i>0;i--) { for(int j=num;j>i;j--) { printf(" "); } ch = 'a' + i -1; for(int j=i;j>0;j--) { printf("%c",ch--); } printf("\n"); } }