-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDayExample.cs
50 lines (47 loc) · 1.26 KB
/
DayExample.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
using System;
using System.Collections.Generic;
using System.Text;
namespace SkillMineProject.ConditionalDemo
{
class DayExample
{
static void Main(String[] args)
{
int weekday;
Console.WriteLine("Enter weekday day number (1-7) : ");
weekday = int.Parse(Console.ReadLine());
if (weekday == 1)
{
Console.WriteLine("Monday");
}
else if (weekday == 2)
{
Console.WriteLine("Tuesday");
}
else if (weekday == 3)
{
Console.WriteLine("Wednesday");
}
else if (weekday == 4)
{
Console.WriteLine("Thursday");
}
else if (weekday == 5)
{
Console.WriteLine("Friday");
}
else if (weekday == 6)
{
Console.WriteLine("Saturday");
}
else if (weekday == 7)
{
Console.WriteLine("Sunday");
}
else
{
Console.WriteLine("Please enter weekday number between 1-7.");
}
}
}
}