Pattern 2
Write a prog. to print following pattern
*****
****
***
**
*
#include<conio.h>
#include<stdio.h>
void main()
{
int n=0,i,j;
clrscr();
printf("Enter N:");
scanf("%d",&n);
printf("\n\n");
for(i=n;i>0;i--)
{
for(j=0;j<i;j++)
{
printf("*");
}
printf("\n");
}
getch();
}
O/P:
No comments:
Post a Comment