알고리즘/백준
[자바스크립트, 백준] 9498 시험성적
moonthree
2023. 3. 13. 11:28
난이도 : 브론즈 5
링크 : https://www.acmicpc.net/problem/9498
문제리뷰
자바스크립트로 백준 풀기 연습
소스코드
const fs = require('fs');
const input = fs.readFileSync("/dev/stdin").toString().trim();
const answer = () => {
if (input >= 90) return "A";
if (input >= 80) return "B";
if (input >= 70) return "C";
if (input >= 60) return "D";
return "F";
}
console.log(answer());