본문으로 바로가기

[Baekjoon 2단계(2)] 9498번 : 시험 성적

category Baekjoon 문제풀이 2021. 8. 31. 13:29

출제 링크 : https://www.acmicpc.net/problem/9498

 

9498번: 시험 성적

시험 점수를 입력받아 90 ~ 100점은 A, 80 ~ 89점은 B, 70 ~ 79점은 C, 60 ~ 69점은 D, 나머지 점수는 F를 출력하는 프로그램을 작성하시오.

www.acmicpc.net

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Solution
{
    class Program
    {
        static void Main(string[] args)
        {
            int Score = int.Parse(Console.ReadLine());

            if(100 >= Score && Score >= 90)
            {
                Console.WriteLine("A");
            }
            else if(89 >= Score && Score >= 80)
            {
                Console.WriteLine("B");
            }
            else if (79 >= Score && Score >= 70)
            {
                Console.WriteLine("C");
            }
            else if (69 >= Score && Score >= 60)
            {
                Console.WriteLine("D");
            }
            else
            {
                Console.WriteLine("F");
            }
        }
    }
}