21
1
using System;
2
3
public class LogicalOperatorProgram
4
{
5
public static void Main()
6
{
7
bool result;
8
int FirstInt = 20, secondInt = 30;
9
// OR operator
10
result = (FirstInt == secondInt) || (FirstInt > 5);
11
Console.WriteLine(result);
12
13
// AND operator
14
result = (FirstInt == secondInt) && (FirstInt > 5);
15
Console.WriteLine(result);
16
17
bool ThirdValue=false;
18
result = !ThirdValue;
19
Console.WriteLine(result);
20
}
21
}
Cached Result