1.Rewrite the program on cumulative final grade. This time:
a. use rectangular arrays.
b. Use array for student name which are also inputted during runtime.
c. Display the student name instead of student# in the final screen output.
1.Rewrite the program on cumulative final grade. This time:
a. use rectangular arrays.
b. Use array for student name which are also inputted during runtime.
c. Display the student name instead of student# in the final screen output.
You've restated the original problem statement (which you already posted).
You have not said what problem you're having.
PLEASE USE CODE TAGS (the <> formatting button) when posting code.
It makes it easier to read your code and also easier to respond to your post. http://www.cplusplus.com/articles/jEywvCM9/
Hint: You can edit your post, highlight your code and press the <> formatting button.
I want to enter student name with test results and display it in the output instead of the
number only. my problem is i cannot display student names in the output ?
Where should i insert this in the existing code?
Since you can calculate grades for 5 students, you want sn to be an array.
1 2 3 4 5 6 7 8
#include <string>
...
string sn[5];
...
for (int i=0; i<5; i++)
{ cout << "Enter the name of student " << i+1;
cin >> sn[i];
}
The above example is just showing entering student names in a simple loop. In your code, you probably want to enter all the information about a student together.