import java.util.Scanner;
public class Test1 {
public static void main(String[] args){
Scanner in = new Scanner(System.in);
String cont="그만할래";
while(cont =="그만할래"); {
System.out.println("점수를입력하쇼");
int score = in.nextInt();
if(score>=90){
System.out.println("수");
}
else if(score >= 80){
System.out.println("미");
}
else if(score >= 70){
System.out.println("양");
}
else if(score >= 60){
System.out.println("가");
}
else{
System.out.println("낙제");
}
{System.out.println("계속할래?");
cont = in.next();
여기서 그만할래를 치면 프로그램을 멈추게하려면 어떻게해야해?
nextLine 아님?
조건바꾸셈
try { int score = in.nextInt(); } catch(Exception e) { break; }
키보드 입력이 문자 또는 숫자 형태인데 무조건 숫자로 읽어들이는게 문제..