using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace ch4_3
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            label2.Text = "Result : ";
            int day = Convert.ToInt32(textBox1.Text);
            switch (day)
            {
                case 0:
                    label2.Text += "Today is saturday ";
                    break;
                case 1:
                    label2.Text += "Today is sunday ";
                    break;
                case 2:
                    label2.Text += "Today is monday ";
                    break;
                case 3:
                    label2.Text += "Today is tuesday ";
                    break;
                case 4:
                    label2.Text += "Today is wednesday ";
                    break;
                case 5:
                    label2.Text += "Today is thursday ";
                    break;
                case 6:
                    label2.Text += "Today is friday ";
                    break;
                default :
                    label2.Text += "Day number is invalid";
                    break;
            }
        }
    }
}
