코딩하는 개굴이

BaekJoon/BOJ [JAVA] 시험 성적_9498 본문

알고리즘/Baekjoon

BaekJoon/BOJ [JAVA] 시험 성적_9498

개굴이모자 2018. 11. 25. 19:56
반응형

BaekJoon/BOJ [JAVA] 시험 성적_9498

HINT: 단순한 if문이다


import java.util.Scanner;
public class baekjoon_9498 {
    public static void main(String [] argc){
        Scanner scanner = new Scanner(System.in);
        int score = Integer.parseInt(scanner.next());

        if(score>=90 && score<=100) System.out.println("A");
        else if(score>=80 && score<=89) System.out.println("B");
        else if(score>=70 && score<=79) System.out.println("C");
        else if(score>=60 && score<=69) System.out.println("D");
        else System.out.println("F");
    }
}


반응형
Comments