APL/APL1.1/TP12/magique.c

33 lines
671 B
C
Raw Normal View History

2021-10-05 16:18:00 +02:00
#include<stdio.h>
#include<stdlib.h>
//Incomplet.
void show2dtable(int l, int c, int table[][5]) {
for (int line = 0; line < (l*2)+1; line++) {
if (line == 0 || line == (l*2)+1 || line % 2 == 0) {
for (int col = 0; col < c; col++) printf("+-----");
printf("+\n");
} else {
for (int col = 0; col < c; col++) printf("| %3d ", table[line/2][col]);
printf("|\n");
}
}
}
int main(int argc, char * argv[]) {
int numcheck[9] = {0, 0, 0, 0, 0, 0, 0, 0, 0};
int carre[3][3] = {};
for (int i = 0; i < 9; i ++) {
printf("Valeur case n°%d : ", i+1);
scanf("%d", carre[i%3][i/3]);
}
for (int i = 0; i < 9; i++) {
if ()
}
return EXIT_SUCCESS;
}