#include
main()
{
int n, c, k, temp;
printf("Enter number of rows\n");
scanf("%d",&n);
temp = n;
for ( c = 1 ; c <= n ; c++ )
{
for( k = 1 ; k <= temp ; k++ )
printf("* ");
temp--;
printf("\n");
}
getch();
return 0;
}
-------------------------------
output:-
Enter number of rows::5
* * * * *
* * * *
* * *
* *
*
No comments:
Post a Comment