Advertisement
Guest User

Untitled

a guest
Sep 18th, 2014
239
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.87 KB | None | 0 0
  1. /*
  2. * To change this license header, choose License Headers in Project Properties.
  3. * To change this template file, choose Tools | Templates
  4. * and open the template in the editor.
  5. */
  6.  
  7. package hackingbank;
  8.  
  9. import java.util.Scanner;
  10.  
  11. /**
  12. *
  13. * @author Broccoli
  14. */
  15. public class HackingBank {
  16. public static void main(String[] args)
  17. {
  18. Scanner scan = new Scanner(System.in);
  19. System.out.println("Enter 3 numbers");
  20. int digit1 = scan.nextInt();
  21. int digit2 = scan.nextInt();
  22. int digit3 = scan.nextInt();
  23. int code = ((digit1 + digit2 + digit3)/10);
  24. switch(code)
  25. {
  26. case 2:
  27. System.out.println("Statue of Liberty: Hacked");
  28. break;
  29.  
  30. default:
  31. System.out.println("No Hack");
  32.  
  33. }
  34.  
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement