Exemplo n.º 1
0
        private void btnCalcularMedia_Click(object sender, EventArgs e)
        {
            Calcular calcular = new Calcular();
            decimal[] valores = new decimal[4];

            valores[0] = 1.5m;
            valores[1] = 2.5m;
            valores[2] = 3.5m;
            valores[3] = 4.5m;

            listBox1.Items.Add(calcular.MediaElementos(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17));
            listBox1.Items.Add(calcular.Media(valores).ToString());

            mostrarLista(10, "oi", 5, 4.5m, "tchau...");
        }