Hey everyone,
I am in an introduction to programming course, and I am tryin to solve the following problem using C#. I know that I am to use arrays, however I am a little lost and was hoping that somebody could give me some assistance.
Here is the code that I have so far:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace Soenenyoung_lab5
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
int scoreTotal = 0;
int scoreCount = 0;
int averageScore = 0;
int[] scores = new int[6];
private void btnAdd_Click(object sender, EventArgs e)
{
//take the values off the form and store them in our scores array
scores[0] = Convert.ToInt32(txtScore.Text);
scores[1] = Convert.ToInt32(txtScore.Text);
scores[2] = Convert.ToInt32(txtScore.Text);
scores[3] = Convert.ToInt32(txtScore.Text);
scores[4] = Convert.ToInt32(txtScore.Text);
scores[5] = Convert.ToInt32(txtScore.Text);
}
}
}