출제 링크 : 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");
}
}
}
}
'Baekjoon 문제풀이' 카테고리의 다른 글
[Baekjoon 2단계(4)] 14681번 : 사분면 고르기 (0) | 2021.08.31 |
---|---|
[Baekjoon 2단계(3)] 2753번 : 윤년 (0) | 2021.08.31 |
[Baekjoon 2단계(1)] 1330번 : 두 수 비교하기 (0) | 2021.08.31 |
[Baekjoon 1단계(11)] 2588번 : 곱셈 (0) | 2021.08.31 |
[Baekjoon 1단계(10)] 10430번 : 나머지 (0) | 2021.08.31 |