Files
DEV/DEV1.1/TP11/remplissage.c
2023-10-03 15:04:06 +02:00

26 lines
635 B
C

#include <stdio.h>
#include <stdlib.h>
#include <time.h>
int main(void) {
int val1,val2,val3,val4,val5,val6,val7,val8,val9,val10,tour,signe;
int tab_val[10]={val1,val2,val3,val4,val5,val6,val7,val8,val9,val10};
for (tour=0;tour<10;tour++){
srand(time(NULL));
tab_val[tour]=rand()%51;
int tab_temp[2]={tab_val[tour],tab_val[tour]*(-1)};
srand(time(NULL));
signe==rand()%2;
tab_val[tour]=tab_temp[signe];
}
printf("+");
for (tour=0;tour<10;tour++)
printf("-----+");
printf("|");
for (tour=0;tour<10;tour++)
printf("%3d |");
printf("+");
for (tour=0;tour<10;tour++)
printf("-----+");
return EXIT_SUCCESS;
}