https://www.acmicpc.net/problem/9498

내 답안
import java.io.*;
import java.util.*;
public class Main{
public static void main(String[] args) throws IOException {
Scanner s = new Scanner(System.in);
int score = s.nextInt();
if (score <= 100 && score >= 90) {
System.out.println("A");
}
else if (score <= 89 && score >= 80) {
System.out.println("B");
}
else if (score <= 79 && score >= 70) {
System.out.println("C");
}
else if (score <= 69 && score >= 60) {
System.out.println("D");
}
else System.out.println("F");
}
}
'Coding Test > 백준' 카테고리의 다른 글
[백준 14681번 - java] 사분면 고르기 (0) | 2021.11.03 |
---|---|
[백준 1330번 - java] 두 수 비교하기 (0) | 2021.11.03 |
[백준 2753번 - java] 윤년 (0) | 2021.11.03 |
[백준 2588번 - java] 곱셈 (0) | 2021.11.02 |
[백준 2558번 - java] A+B - 2 (0) | 2021.11.02 |