Here is a code to develop a program that will print triangle of stars(Reverse) on the screen.
#include
#include
void main()
{
int i,n,j,k;
clrscr();
printf("\n\tEnter a number(maximum range(1 to 20):");
scanf("%d",&n);
for(i=0;i<=n;i++) { for(j=0;j=0;k--)
printf("*");
printf("\n");
}
getch();
}
No comments:
Post a Comment