7일차 switch문의 사용 (9)

Console Programming/C# Console 2019. 9. 26. 11:34

문제)

범위 : 1 ≤ num ≤ 5

 

1 One

 

2 Two

Two

 

3 Three

Three

Three

 

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
54
55
56
57
58
59
60
61
62
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
 
namespace Syntax19
{
    class Program
    {
        static void Main(string[] args)
        {
            //범위: 1 ≤ num ≤ 5
 
            //1 
            //One
 
            //2 
            //Two
            //Two
 
            //3 
            //Three
            //Three
            //Three
 
            int input5 = int.Parse(Console.ReadLine());
            switch (input5)
            {
                case 1:
                    Console.WriteLine("One");
                    break;
                case 2:
                    Console.WriteLine("Two");
                    Console.WriteLine("Two");
                    break;
                case 3:
                    Console.WriteLine("Three");
                    Console.WriteLine("Three");
                    Console.WriteLine("Three");
                    break;
                case 4:
                    Console.WriteLine("Four");
                    Console.WriteLine("Four");
                    Console.WriteLine("Four");
                    Console.WriteLine("Four");
                    break;
                case 5:
                    Console.WriteLine("Five");
                    Console.WriteLine("Five");
                    Console.WriteLine("Five");
                    Console.WriteLine("Five");
                    Console.WriteLine("Five");
                    break;
 
                default:
                    break;
            }
        }
    }
}
 
http://colorscripter.com/info#e" target="_blank" style="color:#e5e5e5text-decoration:none">Colored by Color Scripter
 

 

 

'Console Programming > C# Console' 카테고리의 다른 글

백준 9655 돌 게임  (0) 2019.09.26
백준 5622 다이얼  (0) 2019.09.26
7일차 switch문의 사용 (8)  (0) 2019.09.26
7일차 switch문의 사용 (7)  (0) 2019.09.26
7일차 switch문의 사용 (6)  (0) 2019.09.26
: