using System;
using System.Windows.Forms;

namespace _7_19
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        public void SequenceSearch(int[] a, int x)
        {
            int n = a.Length;
            for (int i = 0; i < n; i++)
            {
                if (x == a[i])
                {
                    MessageBox.Show(x + " ---> " + "A[" + i + "]");
                    return;
                }
            }
            MessageBox.Show("the number is not exist in array");
        }

        private void button1_Click(object sender, EventArgs e)
        {
            int[] a = { 1, 2, 3, 4, 5, 10, 12, 30, 0, 16 };
            SequenceSearch(a, 16);
        }
    }
}