28 lines
476 B
C
28 lines
476 B
C
|
#include <stdio.h>
|
||
|
#include <stdlib.h>
|
||
|
|
||
|
int main() {
|
||
|
int n;
|
||
|
int i=0;
|
||
|
int j;
|
||
|
printf("Veuillez saisir la taille de la table: ");
|
||
|
scanf("%d",&n);
|
||
|
const int taille=n;
|
||
|
printf(" X |");
|
||
|
while(i<=taille){
|
||
|
printf("%4d",i);
|
||
|
i++;
|
||
|
} printf("\n");
|
||
|
i=0;
|
||
|
while (i<=taille+1){
|
||
|
i++;
|
||
|
printf("----");
|
||
|
} printf("\n");
|
||
|
for (i=0;i<=taille;i++){
|
||
|
printf("%3d |",i);
|
||
|
for (j=0;j<=taille;j++){
|
||
|
printf("%4d",i*j);
|
||
|
} printf("\n");
|
||
|
}
|
||
|
return 0;
|
||
|
}
|