A triangle of such a shape will appear,
* * * * *
* * * *
* * *
* * `
*
#include<stdio.h>
#include<conio.h>
int main()
{
int c,i,n;
printf("Enter the number of rows you want on the Right Angled Triangle\n");
scanf("%d",&n);
clrscr();
for(i=n;i>=1;i--)
{
for(c=1;c<=i;c++)
{
printf("*");
}
printf("\n");
}
getch();
return 0;
}
No comments:
Post a Comment