This repository has been archived on 2019-08-09. You can view files and clone it, but cannot push or open issues or pull requests.
s4-c/TP1/E5-2.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;
}