debut TP12

This commit is contained in:
2023-10-03 17:28:25 +02:00
parent d02d219063
commit 389fe16d0a
10 changed files with 208 additions and 4 deletions

37
DEV1.1/TP12/progression.c Normal file
View File

@@ -0,0 +1,37 @@
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
int main(void) {
int tour,tour2,val;
int t1[2][5];
int t2[3][5];
int t3[5][5];
for (tour=0;tour<2;tour++){
for (tour2=1;tour2<6;tour2++)
t1[tour][tour2]=tour;
}
for (tour=0;tour<3;tour++){
for (tour2=1;tour2<6;tour2++)
val=tour+tour2;
t2[tour][tour2]=val;
}
for (tour=0;tour<5;tour++){
for (tour2=1;tour2<6;tour2++)
val=tour+tour2;
t3[tour][tour2]=val;
}
printf("+");
for (tour=0;tour<10;tour++)
printf("-----+");
printf("\n");
printf("|");
for (tour=0;tour<10;tour++)
printf("%4d |",tab_val[tour]);
printf("\n");
printf("+");
for (tour=0;tour<10;tour++)
printf("-----+");
printf("\n");
return EXIT_SUCCESS;
}