Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package conditionalStatements;
- import java.util.Scanner;
- public class SwitchStatement {
- public static void main (String[] args){
- Scanner input = new Scanner(System.in);
- System.out.print("Please enter your age: ");
- int age = input.nextInt();
- System.out.println("The age you have entered is: " + age +"\n");
- switch(age){
- case 0:
- System.out.println("That's impossible, you haven't even been born!!!!");
- break;
- case 1:
- System.out.println("That's impossible, you can't type yet!");
- break;
- case 2:
- System.out.println("That's impossible, How can you type or read?");
- break;
- case 3:
- System.out.println("That's impossible, are you a prodigy?");
- break;
- case 4:
- System.out.println("Alright little guy, you're getting there.");
- break;
- case 5:
- System.out.println("Hm... You should start thinking about your pension plan.");
- break;
- case 6:
- System.out.println("Did you grab them by the pussy?");
- break;
- case 7:
- System.out.println("Almost ready to fulfill your destiny!");
- break;
- default:
- if (age > 7 && age < 60){
- System.out.println("You are old enough to venture out on your own. Here, take a pokemon and go run in tall gras.");
- }else{
- System.out.println("Damn you're an old fuck aren't ya? Even the jews wouldn't burn you up anymore");
- }
- break;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement