I need help writing this!

I am a beginning computer science major and coming up on my final lab exam which is unknown exactly what it will be covering. I know that I really do not understand how to use 1D or 2D Arrays, I have been given a homework assignment that looks like this:

The head coach of a local baseball team would like to hire you to write a program that calculates the batting average of every player on his team. Below is the output that he would like displayed. Write a C++ program to accomplish this task. You must design the program yourself using the appropriate input, process, and output functions.

Player AB HITS AVE
Allan 521 192 .369
Brett 493 180 .365
Carl 451 160 .354
Derek 590 205 .347
Mike 501 167 .333
Henry 485 156 .321
Paul 562 180 .320
Steve 499 159 .318
Josh 480 149 .310
Lee 490 150 .306

Totals 5072 1698 .335

I really do not know how to use arrays and need help with this! I've watched videos, read in my textbook, and my professor showed us in class, I just can't grasp this for some reason. This is my last program before the final and I need to get this one working for a good study reference.. any help would be much appreciated!


closed account (48T7M4Gy)
http://www.cplusplus.com/forum/general/179115/

Duplicate postings are not preferred
Topic archived. No new replies allowed.