diff --git a/Dev1.1/Dev1810/Horizontal b/Dev1.1/Dev1810/Horizontal new file mode 100755 index 0000000..9bdeff8 Binary files /dev/null and b/Dev1.1/Dev1810/Horizontal differ diff --git a/Dev1.1/Dev1810/Horizontal.c b/Dev1.1/Dev1810/Horizontal.c new file mode 100644 index 0000000..f5b6e16 --- /dev/null +++ b/Dev1.1/Dev1810/Horizontal.c @@ -0,0 +1,47 @@ +#include +#include + +int main(int argc, char * argv[]){ +int grille[2][5],grille2[3][5],grille3[5][5]; +int i,j,x=0; +// T1 +for (i=0;i<2;i++){ + for(j=0;j<5;j++){ + grille[i][j]=j+1; + } +} +// T2 +for (i=0;i<3;i++){ + for(j=0;j<5;j++){ + x++; + grille2[i][j]=x; + } +} +// T3 +for (i=0;i<5;i++){ + for (j=0;j<5;j++){ + if (i <= j){ + grille3[i][j]= 0; + }else{ + grille3[i][j] = j+1; + } + } +} +for (i=1;i<2;i++){ + for(j=0;j<5;j++){ + printf("%4d",grille[i][j]); + } + printf(" "); + for(j=0;j<5;j++){ + printf("%4d",grille2[i][j]); + } + printf(" "); + for(j=0;j<5;j++){ + printf("%4d",grille3[i][j]); + } + } + + +printf("\n"); +return EXIT_SUCCESS; +} diff --git a/Dev1.1/Dev1810/Progression.c b/Dev1.1/Dev1810/Progression.c new file mode 100644 index 0000000..50f2574 --- /dev/null +++ b/Dev1.1/Dev1810/Progression.c @@ -0,0 +1,49 @@ +#include +#include + +int main(int argc, char * argv[]){ +int grille[2][5],grille2[3][5],grille3[5][5]; +int i,j,x=0; +// T1 +for (i=0;i<2;i++){ + for(j=0;j<5;j++){ + grille[i][j]=j+1; + } +} +for (i=0;i<2;i++){ + for(j=0;j<5;j++){ + printf("%4d",grille[i][j]); + }printf("\n"); +} +printf("\n"); +// T2 +for (i=0;i<3;i++){ + for(j=0;j<5;j++){ + x++; + grille2[i][j]=x; + } +} +for (i=0;i<3;i++){ + for(j=0;j<5;j++){ + printf("%4d",grille2[i][j]); + }printf("\n"; +} +printf("\n"); +// T3 +for (i=0;i<5;i++){ + for (j=0;j<5;j++){ + if (i <= j){ + grille3[i][j]= 0; + }else{ + grille3[i][j] = j+1; + } + } +} + for (i=0;i<5;i++){ + for(j=0;j<5;j++){ + printf("%4d",grille3[i][j]); + }printf("\n"); +} + +return EXIT_SUCCESS; +} diff --git a/Dev1.1/Dev1810/progression b/Dev1.1/Dev1810/progression new file mode 100755 index 0000000..48f51c2 Binary files /dev/null and b/Dev1.1/Dev1810/progression differ