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