C#/알고리즘
2. 9498번 시험 성적
dev_sr
2020. 4. 7. 00:38
1) 시험 점수를 입력받아 90 ~ 100점은 A
2) 80 ~ 89점은 B
3) 70 ~ 79점은 C
4) 60 ~ 69점은 D
5) 나머지 점수는 F를 출력
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
33
34
35
36
37
38
39
40
41
42
43
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace _9498
{
class Program
{
static void Main(string[] args)
{
if(input>=90 && input<=100)
{
Console.WriteLine("A");
}
else if(input>=80 && input<=89)
{
Console.WriteLine("B");
}
else if (input >= 70 && input <= 79)
{
Console.WriteLine("C");
}
else if (input >= 60 && input <= 69)
{
Console.WriteLine("D");
}
else
{
Console.WriteLine("F");
}
}
}
}
|
출처