Advertisement
Guest User

Untitled

a guest
Dec 21st, 2014
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. void OuiNon(int *valide)
  2. {
  3. char reponse;
  4. do{
  5. reponse = getch();
  6. if(reponse != 'o' && reponse != 'n')
  7. printf("Veuillez repondre par 'o' ou 'n'.\n");
  8. else if(reponse == 'n')
  9. *valide = 0;
  10. else if(reponse == 'o')
  11. *valide = 1;
  12. }while(reponse != 'o' && reponse != 'n');
  13. printf("\n");
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement