22 lines
407 B
C
22 lines
407 B
C
|
#include <stdio.h>
|
||
|
#include <stdlib.h>
|
||
|
|
||
|
#define CAPACITE 30
|
||
|
int main(void) {
|
||
|
int n, i, j;
|
||
|
int tab[CAPACITE][CAPACITE];
|
||
|
for (i = 0 ; i < CAPACITE ; i++){
|
||
|
for (j = 0 ; j != i ; j++){
|
||
|
if(j == 0 || j==i-1){
|
||
|
tab[i][j] = 1;
|
||
|
printf("%10d", tab[i][j]);
|
||
|
}
|
||
|
else{
|
||
|
tab[i][j] = tab[i-1][j-1] + tab[i-1][j];
|
||
|
printf("%10d", tab[i][j]);
|
||
|
}
|
||
|
}
|
||
|
printf("\n\n");
|
||
|
}
|
||
|
return EXIT_SUCCESS;
|
||
|
}
|