Advertisement
CR7CR7

06.ForeignLanguage

Sep 17th, 2022
748
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.60 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class P06ForeignLanguages {
  4.     public static void main(String[] args) {
  5.         Scanner scanner = new Scanner(System.in);
  6.  
  7.         String country = scanner.nextLine();
  8.  
  9.         switch (country) {
  10.             case "England":
  11.             case "USA":
  12.                 System.out.println("English");
  13.                 break;
  14.             case "Spain":
  15.             case "Argentina":
  16.             case "Mexico":
  17.                 System.out.println("Spanish");
  18.                 break;
  19.             default:
  20.                 System.out.println("unknown");
  21.         }
  22.     }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement