19 lines
304 B
C
19 lines
304 B
C
/* Affiche un triangle isocèle non-rectangle */
|
|
#include <stdio.h>
|
|
|
|
int main() {
|
|
int i, j, n;
|
|
printf("Saisissez N\n");
|
|
scanf("%d", &n);
|
|
for (i = 1; i <= n; i++) {
|
|
for (j = 1; j <= n-i; j++) {
|
|
printf(" ");
|
|
}
|
|
for (j = 1; j <= i*2-1; j++) {
|
|
printf("*");
|
|
}
|
|
printf("\n");
|
|
}
|
|
return 0;
|
|
}
|