대입하면 다 맞는 것같은데 어디가 틀린건지 모르겠어요

thisfe Reply 6 years 33 weeks ago
import java.util.Scanner; public class Main { public static void main(String[] args) { // write your code here Scanner input = new Scanner(System.in); String a = input.nextLine(); char b = a.charAt(0); char c = a.charAt(1); if (b == 'M') { System.out.print("Mathematics"); } else if (b == 'C') { System.out.print("Computer Science"); } else if (b == 'I') { System.out.print("Information Technology"); } System.out.print(" "); if (c == '1') { System.out.print("Freshmen"); } else if (c == '2') { System.out.print("Sophomore"); } else if (c == '3') { System.out.print("Junior"); } else if (c == '4') { System.out.print("Senior"); } } }
onacloud Reply 6 years 33 weeks ago
Freshman