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 Практическая_номер_5__7._10_
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void label2_Click(object sender, EventArgs e)
        {

        }

        private void label3_Click(object sender, EventArgs e)
        {

        }

        private void label4_Click(object sender, EventArgs e)
        {

        }

        private void textBox10_TextChanged(object sender, EventArgs e)
        {

        }

        private void button1_Click(object sender, EventArgs e)
        {
            int[] scoresPlayer1 = new int[5];
            scoresPlayer1[0] = Convert.ToInt32(textBox9.Text);
            scoresPlayer1[1] = Convert.ToInt32(textBox11.Text);
            scoresPlayer1[2] = Convert.ToInt32(textBox2.Text);
            scoresPlayer1[3] = Convert.ToInt32(textBox4.Text);
            scoresPlayer1[4] = Convert.ToInt32(textBox6.Text);

            int[] scoresPlayer2 = new int[5];
            scoresPlayer2[0] = Convert.ToInt32(textBox10.Text);
            scoresPlayer2[1] = Convert.ToInt32(textBox1.Text);
            scoresPlayer2[2] = Convert.ToInt32(textBox3.Text);
            scoresPlayer2[3] = Convert.ToInt32(textBox5.Text);
            scoresPlayer2[4] = Convert.ToInt32(textBox7.Text);


            int sumPlayer1 = scoresPlayer1.Sum();
            int sumPlayer2 = scoresPlayer2.Sum();

            label9.Text = ($"Сумма баллов первого спортсмена:{sumPlayer1}.\nСумма баллов второго спортсмена:{sumPlayer2}.");
        }

        private void Form1_Load(object sender, EventArgs e)
        {

        }
    }
}
