oui
This commit is contained in:
parent
5dadaa3828
commit
08449729fb
BIN
Dev1.1/Dev1810/Horizontal
Executable file
BIN
Dev1.1/Dev1810/Horizontal
Executable file
Binary file not shown.
47
Dev1.1/Dev1810/Horizontal.c
Normal file
47
Dev1.1/Dev1810/Horizontal.c
Normal file
@ -0,0 +1,47 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
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;
|
||||
}
|
49
Dev1.1/Dev1810/Progression.c
Normal file
49
Dev1.1/Dev1810/Progression.c
Normal file
@ -0,0 +1,49 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
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;
|
||||
}
|
BIN
Dev1.1/Dev1810/progression
Executable file
BIN
Dev1.1/Dev1810/progression
Executable file
Binary file not shown.
Loading…
Reference in New Issue
Block a user