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)

</script>

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

The problem is that your array

Names[0] "Matt"

Is actually a two dimensional array of characters...so

Names[0][0] = 'M'
Names[0][1] = 'A'

etc.

You will need to use something like this...

tmenu[3] = [["Departments", "#", "dropdown"]];
		smenu[3] = new Array(); fmenu[3] = new Array();
		smenu[3][1] = [["Administration", "#", "noFlyout"]];
		smenu[3][2] = [["Human Resources", "#", "flyout"]];
			fmenu[3][2] = new Array();
			fmenu[3][2][1] = [["Home Page", "#"]];
			fmenu[3][2][2] = [["Employment Opportunities", "#"]];
			fmenu[3][2][3] = [["Teach in Iowa", "#"]];
			fmenu[3][2][4] = [["Info for Teacher Candidates", "#"]];
			fmenu[3][2][5] = [["Master Contract", "#"]];
			fmenu[3][2][6] = [["Iowa Teaching Standards", "#"]];
			fmenu[3][2][7] = [["Non-Discrimination Policy", "#"]];
		smenu[3][3] = [["School Improvement", "#", "noFlyout"]];
		smenu[3][4] = [["Financial Information", "#", "noFlyout"]];
		smenu[3][5] = [["Facilities", "#", "noFlyout"]];
		smenu[3][6] = [["Food Service", "#", "flyout"]];
			fmenu[3][6] = new Array();
			fmenu[3][6][1] = [["Home Page", "#"]];
			fmenu[3][6][2] = [["Account Balances", "#"]];
		smenu[3][7] = [["Child Care", "#", "noFlyout"]];
		smenu[3][8] = [["Transportation", "#", "noFlyout"]];
		smenu[3][9] = [["Adult Education", "#", "noFlyout"]];
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.