Hello, I’m working on this task:
Use a switch statement in your solution. For example:
>admin
Welcome! Full access granted.
Here is my code:
namespace SwitchStatement
{
class AccessChecker
{
static void Main()
{
var question = Console.ReadLine();
switch(question)
{
case "admin":
Console.WriteLine("Welcome! Full access granted.");
case "user":
Console.WriteLine("Welcome! Limited access granted.");
break;
Console.WriteLine("Unknown user");
break;
}
}
}
}
Can anyone please help me to solve it?