Reverse Right Angle Triangle Star Pattern
Output:
Code:
Output:
Enter the number of your choice5
*****
****
***
**
*
Code:
#include<stdio.h>
int main()
{
int i,j,k, n;
printf("\n Enter the number of your choice");
scanf("%d",&n);
for(i=0;i<n;i++)
{
for(k=0;k<i;k++)
{
printf(" ");
}
for(j=n;j>i;j--)
{
printf("*");
}
printf("\n");
}
}
No comments :
Post a Comment