using System;
public class Program
{
public static void Main()
{
Console.Write("Enter the day of the week:");
String str = Console.ReadLine();
String day = "";
switch (str) {
case "1":
day = "Monday";
break;
case "2":
day = "Tuesday";
break;
case "3":
day = "Wednesday";
break;
case "4":
day = "Thursday";
break;
case "5":
day = "Friday";
break;
case "6":
day = "Saturday";
break;
case "7":
day = "Sunday";
break;
}
Console.WriteLine("The day is "+day);
}
}
Comments
Leave a comment