7일차 switch문의 사용 (6)
Console Programming/C# Console 2019. 9. 26. 11:26문제)
1 Monday
2 Tuesday
3 Wednesday
4 Thursday
5 Friday
6 Saturday
7 Sunday
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
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Syntax19
{
class Program
{
static void Main(string[] args)
{
//1 Monday
//2 Tuesday
//3 Wednesday
//4 Thursday
//5 Friday
//6 Saturday
//7 Sunday
int input2 = int.Parse(Console.ReadLine());
switch (input2)
{
case 1:
Console.WriteLine("Monday");
break;
case 2:
Console.WriteLine("Tuesday");
break;
case 3:
Console.WriteLine("Wednesday");
break;
case 4:
Console.WriteLine("Tursday");
break;
case 5:
Console.WriteLine("Friday");
break;
case 6:
Console.WriteLine("Saturday");
break;
case 7:
Console.WriteLine("Sunday");
break;
default:
break;
}
}
}
}
http://colorscripter.com/info#e" target="_blank" style="color:#e5e5e5text-decoration:none">Colored by Color Scripter
|
![](https://blog.kakaocdn.net/dn/mKtST/btqyCK34AFO/WcQKy4x5bd49ff0nftkQL1/img.png)
'Console Programming > C# Console' 카테고리의 다른 글
7일차 switch문의 사용 (8) (0) | 2019.09.26 |
---|---|
7일차 switch문의 사용 (7) (0) | 2019.09.26 |
7일차 switch문의 사용 (5) (0) | 2019.09.26 |
7일차 Switch 문의 사용 (4) (0) | 2019.09.26 |
7일차 switch 문의 사용 (3) (0) | 2019.09.26 |