debut TP12
This commit is contained in:
37
DEV1.1/TP11/progression.c
Normal file
37
DEV1.1/TP11/progression.c
Normal 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;
|
||||
}
|
||||
Reference in New Issue
Block a user