Problems: Write a C program to print Patterns Inverted Pyramid
*****
****
***
**
*
Source Code:
- #include <stdio.h>
- int main()
- {
- int i, j, n;
- printf("Enter N: ");
- scanf("%d", &n);
- for (i=n;i>=1;i--)
- {
- for(j=1;j<=i;j++)
- {
- printf("*");
- }
- printf("\n");
- }
- return 0;
- }
Output:
0 comments:
Post a Comment