/*
Summary: Print stars in ascending order from left to right
*/#include<stdio.h>intmain(){
int row, col, n;
printf("Enter the number of rows: ");
scanf("%d", &n);
for(row=1; row<=n; row++)
{
for(col=1; col<=row; col++)
printf("* ");
printf("\n");
}
return0;
}
0 comments