You are on page 1of 1

Star Pattern

1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.

#include<stdio.h>
void main(){
char print='*';
int row,col;
int noOfRows;
printf("Enter number of rows to be printedn");
scanf("%d",&noOfRows);
for(row=1;row<=noOfRows;row++){
for(col=1;col<=row;col++){
printf("%c",print);
}
printf("\n");
}
}

You might also like