Notice
Recent Posts
Recent Comments
Link
«   2024/09   »
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30
Tags
more
Archives
Today
Total
관리 메뉴

Hennie

[백준] 9498번 : 시험 성적 (JAVA) 본문

BaekJoon/02. if문

[백준] 9498번 : 시험 성적 (JAVA)

헨니 2021. 4. 12. 17:18

 

QUESTION

www.acmicpc.net/problem/9498

 

ANSWER

import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int score = scan.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");
		}
	}
}

 

RESULT