external_8.c
Source Code
c
#include <stdio.h>
int main() {
int rows, i, j, k;
printf("Enter the number of lines: ");
scanf("%d", &rows);
for (i = 1; i <= rows; i++) {
for(j = 1; j <= rows - i; j++) {
printf(" ");
}
for (k = 1; k <= i; k++) {
printf("* ");
}
printf("\n");
}
return 0;
}1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19