Actualiser main.c

This commit is contained in:
bastien 2025-03-31 13:50:20 +00:00
parent 9b1e6a43e5
commit b0a8db8777

6
main.c
View File

@ -17,6 +17,7 @@ Locate(0,0);
printf("%c Oui\n",(curs==0)?'>':' '); printf("%c Oui\n",(curs==0)?'>':' ');
printf("%c Non\n",(curs==1)?'>':' '); printf("%c Non\n",(curs==1)?'>':' ');
} }
int Choisir() int Choisir()
{ {
int curs = 0; int curs = 0;
@ -28,11 +29,12 @@ touche = _getch();
if (touche==0xE0) // fleche : le code fleche renvoie 2 caracteres. if (touche==0xE0) // fleche : le code fleche renvoie 2 caracteres.
{ {
touche = _getch(); touche = _getch();
if (touche==0x50 && curs==0)  // fleche bas if (touche==0x50 && curs==0) // fleche bas
curs = 1; curs = 1;
if (touche==0x48 && curs==1)  // fleche haut if (touche==0x48 && curs==1) // fleche haut
curs = 0; curs = 0;
} }
} while (touche!=0x0D); // enter
return curs; return curs;
} }