-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLab1_Question3.cs
More file actions
70 lines (56 loc) · 1.78 KB
/
Copy pathLab1_Question3.cs
File metadata and controls
70 lines (56 loc) · 1.78 KB
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.IO;
namespace Lab1_Question3
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Enter an integer from 1 to 5:");
int n = Convert.ToInt32(Console.ReadLine());
switch (n)
{
case 1:
{
Console.WriteLine("The integer entered is 1");
Console.ReadKey();
break;
}
case 2:
{
Console.WriteLine("The integer entered is 2");
Console.ReadKey();
break;
}
case 3:
{
Console.WriteLine("The integer entered is 3");
Console.ReadKey();
break;
}
case 4:
{
Console.WriteLine("The integer entered is 4");
Console.ReadKey();
break;
}
case 5:
{
Console.WriteLine("The integer entered is 5");
Console.ReadKey();
break;
}
default:
{
Console.WriteLine("The integer entered is not among one in the above choices");
Console.ReadKey();
break;
}
}
}
}
}