본문 바로가기

IT개발자/백준_Algorithm

백준 9498번 시험 성적 JAVA(자바) 문제 풀이

728x90
반응형
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		
		int A = scan.nextInt();
            scan.close();
		if(90<=A) {
			System.out.println("A");
		}
		if(80 <= A && 90> A ) {
			System.out.println("B");
		}
		if(70<= A&& 80>A) {
			System.out.println("C");
		}
		if(60<=A && 70> A) {
			System.out.println("D");
		}
		if(60>A){
			System.out.println("F");
		}
	}
}
728x90
반응형