C#/수업 내용

[C#] switch case문

JSH1 2021. 8. 23. 11:47
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Hello_World
{
    class Program
    {
        static void Main(string[] args)
        {
            int day = 4;

            switch(day)
            {
                case 0:
                    Console.WriteLine("월요일");
                    break;
                case 1:
                    Console.WriteLine("화요일");
                    break;
                default:
                    Console.WriteLine("수, 목, 금, 토, 일");
                    break;
            }
        }
    }
}