72./*Write
a program to print a triangle.*/
#include<stdio.h>
#include<conio.h>
main()
{
int n,i,j;
clrscr();
printf("Enter The
Number:");
scanf("%d",&n);
for(i=n+1;i>0;i--)
{
for(j=0;j<i;j++)
{
printf("*");
}
printf("\n");
}
getch();
}
OUTPUT:-
Enter The
Number: 5
*****
****
***
**
*
No comments:
Post a Comment