📝 문제
🔓 답안
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
if(n >= 90 && n <= 100){
System.out.println("A");
}
else if(n >= 80 && n <= 89){
System.out.println("B");
}
else if(n >= 70 && n <= 79){
System.out.println("C");
}
else if(n >= 60 && n <= 69){
System.out.println("D");
}
else{
System.out.println("F");
}
sc.close();
}
}
🖤 알고리즘 분류
- 구현
'PS > Baekjoon' 카테고리의 다른 글
[Baekjoon] 10950 - A+B - 3 (0) | 2022.11.03 |
---|---|
[Baekjoon] 2739 - 구구단 (0) | 2022.11.03 |
[Baekjoon] 1000 - A+B (0) | 2022.11.02 |
[Baekjoon] 1330 - 두 수 비교하기 (0) | 2022.11.02 |
[Baekjoon] 2557 - Hello World (0) | 2022.11.01 |
댓글