Advertisement
Guest User

Untitled

a guest
Dec 13th, 2017
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. // Bon j'ai un peu changé parce que je me suis rendu compte que j'avais une fonction qui faisait ça déjà
  2.  
  3. public static int ft_rejouer()
  4. {
  5. int n;
  6.  
  7. n = 2;
  8. System.out.print("Voulez vous rejouer? ");
  9. do
  10. {
  11. System.out.print("(1/0 pour Oui/Non) : ");
  12. if(in.hasNextInt())
  13. {
  14. n = in.nextInt();
  15. return(n);
  16. }
  17. else
  18. String debug = in.next();
  19. } while(n != 1 && n != 0);
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement