You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
373 B

#include <bits/stdc++.h>
using namespace std;
int main() {
int i, j;
int line = 0;
scanf("%d", &line);
for (i = 0; i < line; i++) {
for (j = 0; j <= 2 * line - 2 - i; j++) {
if (j < i)
printf(" ");
else
printf("* ");
}
printf("\n");
}
return 0;
}