using System;
using System.Windows.Forms;

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

        private void button1_Click(object sender, EventArgs e)
        {
            string[] strName = { "رستم", "نصیر", "امین", "هاشم" };
            //---------------------------------------------------
            float[][] grades = new float[4][];
            //---------------------------------------------------
            grades[0] = new float[4] { 20, 15, 18, 17 };
            grades[1] = new float[2] { 14, 19 };
            grades[2] = new float[5] { 13, 19, 20, 16.75f, 17 };
            grades[3] = new float[1] { 19.5f };
            //---------------------------------------------------
            for (int i = 0; i < strName.Length; i++)
            {
                float sum = 0;
                for (int j = 0; j < grades[i].Length; j++)
                    sum = sum + grades[i][j];

                listBox1.Items.Add(strName[i] + ": " +
                                   (sum / grades[i].Length));
            }
        }
    }
}