Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
- */
- package exoduvendredi;
- import java.util.Scanner;
- /**
- *
- * @author Happy
- */
- public class Exoduvendredi {
- /**
- * @param args the command line arguments
- */
- public static void main(String[] args) {
- // TODO code application logic here
- //Demander un prénom
- Scanner sc = new Scanner(System.in);
- String String = sc.nextLine();
- System.out.print (" Entrez votre prénom: ");
- //Demander un âge
- int age;
- Scanner clavier = new Scanner(System.in);
- System.out.print("\n Entrez votre âge:");
- if (clavier.hasNextInt())//blindage du programme contre les double
- { age = clavier.nextInt();
- if (age >= 21){
- System.out.println("Welcome U're major come to the Wonderland");
- } else {
- System.out.println("\"Buuuh buuh buuuhhh U're maybe major but not in USA so get out of here");
- }
- } else {
- System.out.println("Don't kidding me boy");// ;)
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement