Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package first_try;
- import java.util.Scanner;
- public class first_class
- {
- public static void main(String[] args)
- {
- Scanner sc = new Scanner(System.in);
- String prenom;
- char reponse = 'o';
- while(reponse == 'o')
- {
- System.out.print("Saisissez votre prénom : ");
- prenom = sc.nextLine();
- reponse = ' ';
- while(reponse != 'o' && reponse != 'n')
- {
- System.out.print("Voulez vous recommencer ? : ");
- reponse = sc.nextLine().charAt(0);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement