FAQ FAQ  Forum Search   Register Register  Login Login

If You Know C#

Post Date: 2016-04-13

 Post Reply Post Reply
Author
  Topic Search Topic Search  Topic Options Topic Options
Caleb View Drop Down
Groupie
Groupie

Email address used to purchase matched with forums account email.

Joined: 19 Jul 2009
Online Status: Offline
Posts: 354
  Quote Caleb Quote  Post ReplyReply bullet Topic: If You Know C#
    Posted: 13 Apr 2016 at 5:49pm
Hi,

I'm working on a C# project for school and I'm getting no where.

What I'm doing is calculating the total, count, and average of a score that a user inputs into a arraylist.

List<int> SavedScore = new List<int>();   // Creating of ArrayList

private void btn_Add_Click(object sender, EventArgs e)
{

int score = Convert.ToInt32(txtBox_Score.Text);
SavedScore.Add(score);

}

The code above does work to calculate the count (# of score entries into the array).

But I cannot figure out total and average.

Any help would be appreciated!

Caleb
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down



This page was generated in 3.369141E-02 seconds.