25 lines
609 B
C
25 lines
609 B
C
|
#include <stdio.h>
|
||
|
#include <stdlib.h>
|
||
|
int main(void)
|
||
|
{
|
||
|
int table;
|
||
|
printf("Choisissez la table de multiplication que vous voulez afficher :\n");
|
||
|
printf("Ou saisissez -1 pour stopper le programme : ");
|
||
|
scanf("%d", &table);
|
||
|
while (table != -1)
|
||
|
{
|
||
|
int i;
|
||
|
for (i = 0; i <= 10; i += 1)
|
||
|
{
|
||
|
printf("%d", i);
|
||
|
printf(" x ");
|
||
|
printf("%d", table);
|
||
|
printf(" = ");
|
||
|
printf("%d\n", i * table);
|
||
|
}
|
||
|
printf("Table à afficher (-1 = stop) : ");
|
||
|
scanf("%d", &table);
|
||
|
}
|
||
|
return EXIT_SUCCESS;
|
||
|
}
|