Write a program that will calculate course and overall final mark (averages). You write a universal program that does this for any number of courses and assignments in a course. (To make it simple all the courses will have an equal number of assignments) Help: Your program 1) should take input from users to form a array of pointers for courses/assignments, 2) then take input of marks to calculate the averages and 3) output per-course and overall results Example: Input 3 3 4 4 4 Output Course 1: final 3 grades: 2 3 4 Course 2: final 3.33 grades: 4 5 1 Course 3: final 3 grades: 3 4 2 Overall final 3.11

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter8: Arrays And Strings
Section: Chapter Questions
Problem 28SA
icon
Related questions
Question

please help solve this code using c++ arrays and pointers, and incorporate the following code:

for (int i = 0 ; i < course ; i++) { // tell user which course is at cout << "Course "<< i+1 << endl ; // make pointer point to row arr[i] = new float [i+1] ; and then record assignment marks adding to the total for (int j = 0 ; j < entry ; j++) { // prompt for each course's entry cout << "Enter entry " <<j+1<< ": " ; cin >> score ; // store the score to each row arr[i][j] = score ; courseTol += score; }

Write a program that will calculate course and overall final mark (averages).
You write a universal program that does this for any number of courses and assignments in a course.
(To make it simple all the courses will have an equal number of assignments)
Help: Your program 1) should take input from users to form a array of pointers for courses/assignments, 2) then take
input of marks to calculate the averages and 3) output per-course and overall results
Example:
Input
3
3
4
4
5
1
4
2
Output
Course 1: final 3 grades: 2 3 4
Course 2: final 3.33 grades: 4 5 1
Course 3: final 3 grades: 3 4 2
Overall final 3.11
Transcribed Image Text:Write a program that will calculate course and overall final mark (averages). You write a universal program that does this for any number of courses and assignments in a course. (To make it simple all the courses will have an equal number of assignments) Help: Your program 1) should take input from users to form a array of pointers for courses/assignments, 2) then take input of marks to calculate the averages and 3) output per-course and overall results Example: Input 3 3 4 4 5 1 4 2 Output Course 1: final 3 grades: 2 3 4 Course 2: final 3.33 grades: 4 5 1 Course 3: final 3 grades: 3 4 2 Overall final 3.11
Expert Solution
steps

Step by step

Solved in 3 steps with 2 images

Blurred answer
Knowledge Booster
Array
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning