DEV/DEV1.1/SAé/test2.c

16 lines
350 B
C
Raw Permalink Normal View History

2024-12-02 14:12:49 +01:00
# include <stdio.h>
# include <stdlib.h>
int main(int argc, char** argv) {
int pion_x, pion_y;
int taille_grille;
srand(time(NULL));
printf("Taille de la grille : ");
scanf("%d",&taille_grille);
putchar('\n');
pion_x = (rand() % taille_grille);
pion_y = (rand() % taille_grille);
printf("%d, %d\n", pion_x, pion_y);
return EXIT_SUCCESS;
}