Hello Everyone, I am having quite a problem with a program I am trying to get working. I am trying to make a marks tracking program using an array that has an array of strings 3 elements long called Names.
Has a 2D array of integers 3 * 2 elements in size called Marks.
Has an array of floating point numbers 3 elements called Averages.
Prompt the user for 3 student names. Store the values in the Names array.
For each student: Prompt the user for marks in 2 classes: Math and Chemistry.
Calculate the average mark for each student. Store the averages in the Averages array.
print all student names, marks and averages on the screen. Here is what I have already..

<script type="text/javascript">

var Names = new Array();
var Marks = new Array();
var Averages = new Array();

Names[0] = "Matt";
Names[1] = "Tom";
Names[2] = "Kelly";

Marks[0][1] =
Marks[0][2] =
Marks[1][1] =
Marks[1][2] =
Marks[2][1] =
Marks[2][2] =

Averages[0] =
Averages[1] =
Averages[2] =

Names = prompt("Enter The First Students Name (Matt, Tom or Kelly)");
Marks = prompt("Enter The Math Mark for " + Names)
prompt("Enter The Chemistry Mark for " + Names)


I am completely stumped so any help at all would be awesome.

10 Years
Discussion Span
Last Post by masijade
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.