시험범위 출력(19.09.24)
Console(콘솔)/실습 2019. 9. 24. 10:51
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
44
45
46
47
48
49
50
51
52
53
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Syntax07
{
class Program
{
static void Main(string[] args)
{
//int n = int.Parse(Console.ReadLine());
for (int a = 1; a > 0; a++)
{
Console.Write("입력 : ");
string str = Console.ReadLine();
int input = int.Parse(str);
if (input >= 90&&input <=100)
{
Console.WriteLine("출력: A");
}
else if (input >= 80&&input <90)
{
Console.WriteLine("출력: B");
}
else if (input >= 70&&input <80)
{
Console.WriteLine("출력: C");
}
else if (input >= 60&&input<70)
{
Console.WriteLine("출력: D");
}
else if(input <60)
{
Console.WriteLine("출력: F");
}
else
{
Console.WriteLine("잘못 입력하셧습니다.");
continue;
}
}
}
}
}
|
'Console(콘솔) > 실습' 카테고리의 다른 글
배수 참/거짓 (19.09.24) (0) | 2019.09.24 |
---|---|
두번째로 큰 정수가 누구인가 (19.09.24) (0) | 2019.09.24 |
상품 구매 갯수 선택 및 재고목록(19.09.23) (0) | 2019.09.23 |
상품 구매 및 판매(19.09.23) (0) | 2019.09.23 |
상점에서 구매 후 구매 목록 작성(19.09.23) (0) | 2019.09.23 |