-
[java]백준 시험 성적 9498번알고리즘 문제풀이/백준(자바) 2023. 3. 16. 22:29
코드
import java.util.Scanner; public class BOJ_9498 { public static void main(String[] args) { Scanner in = new Scanner(System.in); byte q = in.nextByte();//100이하 수 if(100>=q && 90<=q){ System.out.println("A"); }else if(89>=q && 80<=q){ System.out.println("B"); }else if(79>=q && 70<=q){ System.out.println("C"); }else if(69>=q && 60<=q){ System.out.println("D"); }else if(q<=59){ System.out.println("F"); } in.close(); } } // q 자료형 byte 100이하 수 // &&는 and연산자
링크
https://www.acmicpc.net/problem/9498
'알고리즘 문제풀이 > 백준(자바)' 카테고리의 다른 글
[java]백준 구구단 2739번 (0) 2023.03.17 [java]백준 A+B - 3 10950번 (0) 2023.03.17 [java]백준 윤년 2753번 (0) 2023.03.16 [java]백준 두 수 비교하기 1330번 (0) 2023.03.16 [java]백준 Hello World 2557번 (0) 2023.03.15