This commit is contained in:
Geir Okkenhaug Jerstad 2024-11-14 13:29:50 +01:00
parent 99e528e51e
commit ddc33e2beb
4 changed files with 72 additions and 6 deletions

View file

@ -0,0 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
</Project>

View file

@ -0,0 +1,34 @@
namespace CompareApp
{
class IsEqualOr
{
private static int num = 10;
private static int num2 = 10;
private static bool IsEqual = false;
static void Main(string[] args)
{
if (num == num2)
{
Console.WriteLine("Equal");
IsEqual = true;
}
else
{
Console.WriteLine("Not Equal");
IsEqual = false;
}
if (IsEqual)
{
num++;
Console.WriteLine(num);
}
else
{
num--;
Console.WriteLine(num);
}
}
}
}