- using System;
- using System.Collections.Generic;
-
- namespace exercise_79
- {
- class Program
- {
- public static void Main(string[] args)
- {
-
- int[] array = new int[10];
- array[0] = 6;
- array[1] = 2;
- array[2] = 8;
- array[3] = 1;
- array[4] = 3;
- array[5] = 0;
- array[6] = 9;
- array[7] = 7;
-
- Console.WriteLine("Search for?");
- int searching = Convert.ToInt32(Console.ReadLine());
-
-
- }
-
- }
- }
The exercise template has already an array containing numbers. Complete the program to ask the user for a number to search in the array. If the array contains the given number, the program tells the index containing the number. If the array doesn't contain the given number, the program will tell the number wasn't found.