using System.Collections.Generic;
using System.Threading.Tasks;
public static void Main(string[] args)
char[] letters = "the quick brown fox jumps over the lazy dog".ToCharArray();
int[] numbers = {0, 2, 3, 5, 7, 1, 1, 2, 5, 6, 7, 2, 5, 2};
string[] poem = "mary had a little lamb its fleece was white as snow".Split();
PrintIntegerArray(numbers);
PrintIntegerArray(numbers);
Console.WriteLine("{Array.BinarySearch(numbers, 3)}");
PrintIntegerArray(numbers);
Console.WriteLine("{Array.BinarySearch(numbers, 3)}");
int[] array = CreateIntegerArray(10);
PrintIntegerArray(array);
int[] array_2 = CreateIntegerArray(10);
PrintIntegerArray(array_2);
Console.Write("Press Enter to terminate: ");
public static void PrintCharArray(char[] array)
for (int i = 0; i < array.Length; i++){
Console.Write("{array[i]} ");
public static void PrintIntegerArray(int[] array)
for (int i = 0; i < array.Length; i++)
Console.Write("{array[i]} ");
public static void PrintPoemArray(string[] poem)
for (int i = 0; i < poem.Length; i++)
Console.Write("{poem[i]} ");
public static int[] CreateIntegerArray(int size)
int[] array = new int[size];
for (int i = 0; i < size; i++)
Console.Write("Please enter a number: ");
array[i] = Convert.ToInt32(Console.ReadLine());
public static int[] intCreateAnotherArray(int size)
Random rand = new Random();
int[] array = new int[size];
for (int i = 0; i < size; i++)
array[i] = rand.Next(100,200);