시험 성적
문제
내 풀이
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;
public class Main
{
public static void main(String[] args) throws IOException
{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int test = 0;
char grade;
test = Integer.parseInt(br.readLine());
if( test >= 90)
grade = 'A';
else if( test >= 80)
grade = 'B';
else if( test >= 70)
grade = 'C';
else if( test >= 60)
grade = 'D';
else
grade = 'F';
System.out.println(grade);
}
}