RND
This commit is contained in:
parent
ddc33e2beb
commit
95d3a2be13
4 changed files with 82 additions and 1 deletions
|
@ -6,6 +6,13 @@
|
|||
private static int num2 = 10;
|
||||
private static bool IsEqual = false;
|
||||
static void Main(string[] args)
|
||||
{
|
||||
Compare();
|
||||
UnEqual(5, 5);
|
||||
IsThirty(25, 5);
|
||||
}
|
||||
|
||||
static void Compare()
|
||||
{
|
||||
if (num == num2)
|
||||
{
|
||||
|
@ -17,7 +24,7 @@
|
|||
Console.WriteLine("Not Equal");
|
||||
IsEqual = false;
|
||||
}
|
||||
|
||||
|
||||
if (IsEqual)
|
||||
{
|
||||
num++;
|
||||
|
@ -29,6 +36,30 @@
|
|||
Console.WriteLine(num);
|
||||
}
|
||||
}
|
||||
|
||||
static int UnEqual(int num1, int num2)
|
||||
{
|
||||
if (num1 != num2)
|
||||
{
|
||||
return num1 + num2;
|
||||
}
|
||||
else
|
||||
{
|
||||
return num1 * num2;
|
||||
}
|
||||
}
|
||||
|
||||
static bool IsThirty(int num, int num2)
|
||||
{
|
||||
if (num + num2 == 30)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue