Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class birth {
- public static void main(String[] args){
- int age = 0;
- boolean honest = false;
- boolean accept = false;
- System.out.println("Happy Birthday Nick!");
- System.out.println("How old are you now?");
- Scanner scan = new Scanner(System.in);
- age = scan.nextInt();
- while(honest != true){
- if(age == 19)
- {System.out.println("Damn! You're getting old!");
- honest = true;
- }
- else
- {System.out.println("I know you be lyin'! How old are you REALLY?");
- age = scan.nextInt();
- }
- }
- System.out.println("\nWas your birthday fun? (1 means yes; 0 means no)");
- int fun = scan.nextInt();
- if(fun == 1)
- System.out.println("Awesome! But more is to come!");
- else
- System.out.println(" Well, it will get better!");
- System.out.println("\nDo you want to get dinner on Sunday evening (my treat :D)(1 means yes; 0 means no)");
- int dinner = scan.nextInt();
- while(accept != true){
- if(dinner == 1){
- System.out.println("Yay! Think of a good place and text me!");
- accept = true;
- }
- else if(dinner == 0){
- System.out.println("Sorry can't accept that as an answer! Try again!");
- dinner = scan.nextInt();
- }
- }
- System.out.println("Ya, this was nerdy! But hey, hope you liked it! ");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement