Advertisement
Guest User

Untitled

a guest
May 23rd, 2019
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.79 KB | None | 0 0
  1. import java.util.Scanner;
  2. import java.util.Random;
  3. import static java.lang.System.out;
  4. class yearCalender
  5. {
  6. public static void main(String args[])
  7. {
  8. Scanner ghostScanner = new Scanner (System.in);
  9. out.println("it's a hell of a life, you love Rita ora? Y/N ");
  10. char fan = ghostScanner.findInLine(".").charAt(0);
  11. if (fan == 'y')
  12. {
  13. out.println("you're a member of the ghostCommunity \nthus the script is running forward");
  14. out.println("the questioning machine is under maintainance , how about using the calender machine? \ndo you wish to continue Y/N");
  15. char anotherChoice = ghostScanner.findInLine(".").charAt(0);
  16.  
  17. if (anotherChoice == 'Y')
  18. {
  19. out.println("you passed the test another time , alright you can ask for any month of your own choice");
  20. out.println("it should be in number");
  21. int ghostCustomerInput = ghostScanner.nextInt();
  22. switch(ghostCustomerInput){
  23. case 1:
  24. case 3:
  25. case 5:
  26. case 7:
  27. case 8:
  28. case 10:
  29. case 12:
  30. out.println(ghostCustomerInput + " has 31 days" );
  31. break;
  32. case 4:
  33. case 6:
  34. case 9:
  35. out.println(ghostCustomerInput + " has 30 days only ");
  36. case 2:
  37. out.println("bruv is it a leap year answer in binary :) ");
  38. int leapBoolean = ghostScanner.nextInt();
  39. if (leapBoolean == 1){
  40. out.println(ghostCustomerInput + " has 29 days");
  41. }
  42. else{
  43. out.println(ghostCustomerInput + " has 28 days ");
  44. }
  45. }
  46. }
  47. else{
  48. out.println("404 Forbidden content");
  49. }
  50. }
  51. else {
  52. out.println("it's a hell of a life \nbro you wanna play the dino game? ");
  53. }
  54.  
  55. }
  56. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement