백준 BOJ C# 9488
2020. 1. 9. 20:02ㆍ백준 알고리즘 단계별/if 문
반응형
출제 링크 : https://www.acmicpc.net/problem/9498
코드
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
using System;
using static System.Console;
namespace baekjoon
{
class Program
{
static void Main(string[] args)
{
string input = Console.ReadLine();
int num = int.Parse(input);
if (100 >= num && 90 <= num)
{
WriteLine("A");
}
else if (89 >= num && 80 <= num)
{
WriteLine("B");
}
else if (79 >= num && 70 <= num)
{
WriteLine("C");
}
else if (69 >= num && 60 <= num)
{
WriteLine("D");
}
else
WriteLine("F");
}
}
}
http://colorscripter.com/info#e" target="_blank" style="color:#4f4f4ftext-decoration:none">Colored by Color Scripter
http://colorscripter.com/info#e" target="_blank" style="text-decoration:none;color:white">cs |
반응형