숫자 입력, 날짜 출력

Console(콘솔)/실습 2019. 9. 26. 10:42

   int a = int.Parse(Console.ReadLine());            

   Console.Clear();

            switch (a)

            {

                case 1:

                    Console.WriteLine("Monday");

                    break;

                case 2:

                    Console.WriteLine("Tuesday");

                    break;

                case 3:

                    Console.WriteLine("Wenesday");

                    break;

                case 4:

                    Console.WriteLine("Thursday");

                    break;

                case 5:

                    Console.WriteLine("Friday");

                    break;

                case 6:

                    Console.WriteLine("Saturday");

                    break;

                default:

                    Console.WriteLine("Sunday");

                    break;

            }

 

'Console(콘솔) > 실습' 카테고리의 다른 글

두수를 입력받아 변수에 담기  (0) 2019.09.26
switch 예제문  (0) 2019.09.26
보기 문제의 정답 입력,출력  (0) 2019.09.26
switch  (0) 2019.09.26
switch문, if-else문 사용  (0) 2019.09.26
: