I managed to get some help from the internet, however, my compiler is giving an error message of "Error: Range-based loops are not allowed in C++98" and currently I am using Dev-C++ 5.11. Any idea to counter this issue? |
I think a better question is "how will this code help you for this assignment?" Do you understand what the code does and how it works? If you're going to grab some code from the web, it's critical that you understand it. Otherwise it might hurt more than it helps.
I always find it helpful to read the assignment several times and think about the data that I'll need to write the program. In this case, there is one tiny but critical little bit in part D:
The comparison is conducted through three different analyses which are mean, median and standard deviation |
To compute the median, you need to sort the values, which means you must store them all. So I think
Learner2 is right: you should create a class to store the info for a single student and then make a vector of all of them.
After you have code to read the data, go through each part (a-g) separately and write the code to compute and print whatever is needed for that part. When you're done, go back through and format the code as needed.
Now speaking of output, you give this:
1 2 3
|
ID Total CW A B C
21716 36.33 87.34 46.68 7.34
21584 31.67 96.66 56.66 16.66
| |
I see that the first column is the student ID and the second column is the total coursework mark, but what are columns A B and C? How are these values computed for these two students? Which of the parts (a-g) does this bit represent? Since it can't be the output for the all parts, where is the output for the others?
Basically, these questions all raise a red flag for me. What exactly is the required output? It will be impossible to write the program without knowing exactly what the output should be.