What is wrong in this code?
Why not compillating this code?? Anyone know? Это задача про эмоции робота Для изучения switch и case Вот я списал с правильного ответа этот код, но он не проходит import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int emotion = scanner.nextInt(); /* 1 - "You are happy!" 2 - "You are sad!" 3 - "You are angry!" 4 - "You are surprised!" other - "Unknown emotion." */ switch(emotion){ case 1: System.out.print("You are happy!"); break; case 2: System.out.print("You are sad!"); break; case 3: System.out.print("You are angry!"); break; case 4: System.out.print("You are surprised!"); default: System.out.print("Unknown emotion."); } } }