1
2 2
3 3 3
4 4 4 4
5 5 5 5 5
*/
#include<stdio.h>
int main()
{
int i,j,n;
printf("Enter no. of lines: ");
scanf( "%d",&n);
//for loop for number of lines
for(i=1;i<=n;i++)
{ //for loop for number of stars
for(j=1;j<=i;j++)
{
printf("%d ",i);
\}
\printf("\n");\
}
}
0 comments: