debut TP11

This commit is contained in:
2023-10-03 15:04:06 +02:00
parent 1d0f50ba9a
commit d02d219063
8 changed files with 77 additions and 0 deletions

26
DEV1.1/TP11/remplissage.c Normal file
View File

@@ -0,0 +1,26 @@
#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;
}