뭐가틀려요?실행은잘되는데

sanghoon Reply 8 years 30 weeks ago
import java.util.Scanner; public class Main { public static void main(String[] args){ Scanner input = new Scanner(System.in); String a = input.nextLine(); char b = a.charAt(0); char c = a.charAt(1); if(b =='M'){ if(c =='1'){ System.out.println("Mathmatics Freshman"); } if(c == '2'){ System.out.println("Mathmatics Sophomore"); } if(c=='3'){ System.out.println("Mathmatics Junior"); } if(c == '4'){ System.out.println("Mathmatics Senior"); }} if(b =='C'){ if(c =='1'){ System.out.println("Computer Science Freshman"); } if(c == '2'){ System.out.println("Computer Science Sophomore"); } if(c=='3'){ System.out.println("Computer Science Junior"); } if(c == '4'){ System.out.println("Computer Science Senior"); } } if(b == 'I'){ if(c =='1'){ System.out.println("Information Technology Freshman"); } if(c == '2'){ System.out.println("Information Technology Sophomore"); } if(c=='3'){ System.out.println("Information Technology Junior"); } if(c == '4'){ System.out.println("Information Technology Senior"); } } }}
indosm Reply 8 years 30 weeks ago
Mathmatics가 아니라 Mathematics