Advertisement
Guest User

Untitled

a guest
Jul 30th, 2014
202
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.19 KB | None | 0 0
  1. import java.util.Scanner;
  2. public class birth {
  3. public static void main(String[] args){
  4. int age = 0;
  5. boolean honest = false;
  6. boolean accept = false;
  7. System.out.println("Happy Birthday Nick!");
  8. System.out.println("How old are you now?");
  9. Scanner scan = new Scanner(System.in);
  10. age = scan.nextInt();
  11. while(honest != true){
  12. if(age == 19)
  13. {System.out.println("Damn! You're getting old!");
  14. honest = true;
  15. }
  16. else
  17. {System.out.println("I know you be lyin'! How old are you REALLY?");
  18. age = scan.nextInt();
  19. }
  20. }
  21. System.out.println("\nWas your birthday fun? (1 means yes; 0 means no)");
  22. int fun = scan.nextInt();
  23. if(fun == 1)
  24. System.out.println("Awesome! But more is to come!");
  25. else
  26. System.out.println(" Well, it will get better!");
  27. System.out.println("\nDo you want to get dinner on Sunday evening (my treat :D)(1 means yes; 0 means no)");
  28. int dinner = scan.nextInt();
  29. while(accept != true){
  30. if(dinner == 1){
  31. System.out.println("Yay! Think of a good place and text me!");
  32. accept = true;
  33. }
  34. else if(dinner == 0){
  35. System.out.println("Sorry can't accept that as an answer! Try again!");
  36. dinner = scan.nextInt();
  37. }
  38. }
  39. System.out.println("Ya, this was nerdy! But hey, hope you liked it! ");
  40. }
  41. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement