백준

백준 9498번 문제 시험 성적 (Java)

gxxgsta 2021. 4. 17. 15:26
반응형
SMALL
package year;

import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int score = sc.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");
		}
	}
}
반응형
LIST