using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

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

        private void button1_Click(object sender, EventArgs e)
        {
            label1.Text = "Saturday  Sunday  Monday \n";
            label1.Text += "----------------------------------\n";
            int [,] temp = new int[3, 4] {{12, 17, 14, 10},
                                         {18, 20, 17, 14},
                                         {10, 12, 13, 11}};
            int srow = 0;
            float rowAve;
            for (int i = 0; i < 3; i++)
            {
                for (int j = 0; j < 4; j++)
                    srow += temp[i, j];
                rowAve = (float)srow / 4;
                label1.Text += rowAve.ToString()  + "          ";
                srow = 0;
            }
        }

        private void Form1_Load(object sender, EventArgs e)
        {

        }
    }
}
