Home » questions » C++ question?
C++ question?
This prgm is supposed to read from the input file
containing student scores for 3 exams to calculate a
grading curve and output a report showing scores and
grades.
The grading curve is as follows:
90% of the highest score in each exam= bottom of 'A'
grade
80% of the highest score in each exam= bottom of 'b'
grade
70% of the highest score in each exam= bottom of 'c'
grade
60% of the highest score in each exam= bottom of 'c'
grade
e.g of input file would be
John 83 92 86
Peter 74 79 87
Ann 77 85 81
Will 66 72 70
Oje 80 91 77
Ben 94 89 89
The output would be:
Exam 1: Exam2: Exam 3: Total:
A cut-off= 85 83 80 248
B cut-off= 75 74 71 220
C cut-off= 66 64 62 192
D cut-off= 56 55 53 164
Student results and grades:
John 83=B 92=A 86=A 261=A
Peter 74=C 79=B 87=A 240=B
etc.
Any ideas??
Please show how we could use 4 parallel arrays to hold student
scores(3 for each exam, and one string array for
student names). Also four parallel arrays to hold the
cut-offs and totals(3 for the cut-offs and one for the
totals) Totals do not require an array. I really do not know where to start. Arrays are confusing!!
Thanks a million!!
The output would be:
Exam 1: Exam2: Exam 3: Total:
A cut-off= 85 83 80 248
B cut-off= 75 74 71 220
C cut-off= 66 64 62 192
D cut-off= 56 55 53 164
Student results and grades:
John 83=B 92=A 86=A 261=A
Peter 74=C 79=B 87=A 240=B
Ann 77=B 85=A 81=B 253=B
I appreciate your answers but i am required to use parallel one-dimensional arrays for this one. I am yet to study 2 or other multi-dimensional arrays. THANKS!!

Answers
stopxsnap
On 2006-07-30 14:19:43
Mark H
On 2006-07-30 16:26:29
I Know Nuttin, Special Agent
On 2006-07-30 14:24:06
avramti
On 2006-07-30 14:29:41
kris
On 2006-07-30 14:24:45