Created
June 18, 2018 14:25
-
-
Save cloudengineer89/ba77b07e158ee02caae425499a786374 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ArrayEx | |
{ | |
static void Main() | |
{ | |
CountSheeps(true,false, true, true, true); | |
Console.WriteLine(); | |
Console.ReadKey(); | |
} | |
public static int CountSheeps(bool[] sheeps) | |
{ | |
int counts = 0; | |
bool[] arr = new bool[5]; | |
for (int i = 0; i < arr.Length; i++) | |
{ | |
if (arr[i] == true) | |
{ | |
counts++; | |
} | |
} | |
return counts; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment