Advertisement
did0sh

Problem01. Choose a Drink

Sep 24th, 2017
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. /**
  4. * Created by user on 23.9.2017 г..
  5. */
  6. public class p01_ChooseADrink {
  7. public static void main(String[] args) {
  8. Scanner scan = new Scanner(System.in);
  9.  
  10. String profession = scan.nextLine();
  11.  
  12. switch (profession){
  13. case "Athlete":
  14. System.out.println("Water"); break;
  15. case "Businessman":
  16. case "Businesswoman":
  17. System.out.println("Coffee"); break;
  18. case "SoftUni Student":
  19. System.out.println("Beer"); break;
  20. default:
  21. System.out.println("Tea"); break;
  22.  
  23. }
  24. }
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement