-
Notifications
You must be signed in to change notification settings - Fork 0
/
M1Bool.cs
39 lines (28 loc) · 929 Bytes
/
M1Bool.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
int adminLevel = 70;
int managerLevel = 17;
string [] permissions = { "Admin", "Manager", "None" };
Console.Write($"{permissions[0]}, {permissions[1]}, or {permissions[2]}?");
Console.ReadLine();
if (permissions.Contains("Admin"))
{
Console.WriteLine($"{(adminLevel > 55 ? "Welcome, Super Admin user." : "Welcome, Admin user.")}");
}
if (permissions.Contains("Manager"))
{
Console.WriteLine($"{(managerLevel > 20 ? "Contact an Admin for access." : "You do not have sufficient privileges.")}");
}
if (permissions.Contains("None"))
{
Console.WriteLine("You do not have sufficient privileges.");
}
/*int a = 7;
int b = 6;
Console.WriteLine(a == b); //output: false
(a != b); // true
*/
/*Random coin = new Random();
int flip = coin.Next(0, 2);
Console.WriteLine((flip == 0) ? "heads" : "tails");
/or
Random coin = new Random();
Console.WriteLine((coin.Next(0, 2) == 0) ? "heads" : "tails");*/