Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.ArrayList;
- import java.util.Scanner;
- public class Main {
- /**
- * @param args
- */
- public static void main(String[] args) {
- System.out.println ("|-------------------------------------------|");
- System.out.println ("|Bienvenue sur le bla bla |");
- Scanner sc = new Scanner(System.in);
- System.out.println ("|Veuillez vous identifiez |");
- String str = sc.nextLine ();
- System.out.println ("|Bienvenue :" +str+ " |");
- System.out.println ("|Veuillez entrez le code secret |");
- ArrayList<String> pseudos = new ArrayList<String>();
- pseudos.add("3615");
- String str1 = sc.nextLine ();
- if(pseudos.contains (str1))
- System.out.println ("|Le code secret est correct :" +str1+ " |");
- else
- {
- System.out.println("|Erreur! |");
- return;
- }
- String prenom;
- char reponse = 'O';
- while (reponse == 'O')
- {
- System.out.println("Donnez un prénom : ");
- prenom = sc.nextLine();
- System.out.println("Bonjour " +prenom+ " voici votre bouclier");
- System.out.println("Bouclier initailisé. Voulez vous un autre bouclier ?(O/N)");
- reponse = sc.nextLine().charAt(0);
- }
- System.out.println("Négation enregistrée");
- System.out.println("Veuillez faire attention aux zones à risques, des balles perdues sont toujours désagréables");
- }
- }
Add Comment
Please, Sign In to add comment