Tuesday, September 13, 2011

Day Find


class Program
{
static void Main(string[] args)
{
int n;

Console.WriteLine("Enter any number");
n = Convert.ToInt32(Console.ReadLine());

switch (n)
{
case 0:
{

Console.WriteLine(" day is monday");
break;
}


case 1:
{
Console.WriteLine("day is tuesday");
break;
}
case 2:
{
Console.WriteLine("day is wednsday");
break;
}
case 3:
{
Console.WriteLine("day is thursday");
break;
}
case 4:
{
Console.WriteLine("day is friday");
break;
}
case 5:
{
Console.WriteLine("day is saturday");
break;
}
case 6:
{
Console.WriteLine("day is sunday");
break;
}
default:
{
Console.WriteLine("Invalid Number");
break;
}
}
Console.ReadLine();
}
}

No comments:

Post a Comment

Popular 5 Posts Last 7 days