ms_learn_csharp/013_eval_boolean_expressions/challenge_solution/Program.cs
2024-07-19 20:30:50 -04:00

19 lines
533 B
C#

string permission = "Admin|Manager";
int level = 53;
if (permission.Contains("Admin")) {
if (level > 55) {
Console.WriteLine("Welcome, Super Admin user.");
} else {
Console.WriteLine("Welcome, Admin user.");
}
} else if (permission.Contains("Manager")) {
if (level >= 20) {
Console.WriteLine("Contact an Admin for access.");
} else {
Console.WriteLine("You do not have sufficient privileges.");
}
} else {
Console.WriteLine("You do not have sufficient privileges.");
}