Having trouble creating a nested for loop for three and two dimensional arrays.
Am I getting it wrong at some point in my program? I'm not entirely sure on how to go about creating a for loop with arrayforloops? I do not know how to organize it correctly
Would it be like:
(OUTER for loop on students)
{
----(2D Array string forloop){
--------(2D Array string forloop){
-------}
------}
---------(2D Array int forloop){
-------------(2D Array int forloop){
-------}
-------}
-------(MIDDLE for loop on course)
{
---------(3D Array double forloop){
-------------(3D Array double forloop){
-----------------(3D Array double forloop){
-------}
-------}
-------}
----------------------(INNER for loop on exams)
{
------------------------(2D Array char forloop){
---------------------------(2D Array char forloop){
-------}
-------}
}//end of inner loop
----------}Closed middle loop
}//Closed outerloop
Below in the program description and my sorry shameful attempt...
.............................................................................
/*--Two and three dimensional arrays to store all input and output data and fill these arrays by the data read from the input file and by the computed data. The data of all students will be stored in these arrays before writing it to the output file.
----A two dimensional array nonNumeric1 of type string -nonNumeric1 [3] [9]
----A two dimensional array numeric 1 of type int- numeric1 [3] [2].
----A three dimensional array numeric2 of type double to store input data (read from input file) for three students, three courses and five exams, and computed Numerical Grades. For three students it may look like
Numeric2 [3] [3] [6]
----A two dimensional array letterGrade of type char to store letter grades of three students and three courses. For three students and three courses it may look like letterGrade [3] [3].
• Read the input from the Input File. Report should be based on three students each taking three courses. It means that you will be using a nested “for” loop. The outer loop will be on students, the middle loop will be on courses and the inner loop will be on five Exams.
*/