Question: Write this in C + + , write a program that will calculate what percentage of students chose each major along with the total enrolled

Write this in C++, write a program that will calculate what percentage of students chose each major along with the total enrolled and most popular major
Prompt the user for 5 majors and a count of the number of students enrolled in each major
You will need to use 2 parallel arrays, one for the majors and one for the number of students enrolled
Each major name will be a single word (no spaces) to make input easier
Output a heading followed by each major, the number enrolled, and percentage of student enrolled in that major
"Major" and "Enrolled" and the corresponding values are each printed left justified in a 10-column wide space
The "Percent" is printed after "Enrolled" to 2 decimal places
There are no extra spaces between "Major", "Enrolled", and "Percent" except for the unused spaces within the 10-column wide space
Output the total number of students enrolled and the major with the most students enrolled
You MUST write 2 functions in addition to main
One function should calculate the total number of students enrolled
One function should find the index of the largest number of students enrolled
Sample Run #1(bold, underlined text is what the user types):
Major Count? CompSci 100
Major Count? Math 50
Major Count? Business 150
Major Count? Nursing 50
Major Count? English 50
Major Enrolled Percent
CompSci 10025.00
Math 5012.50
Business 15037.50
Nursing 5012.50
English 5012.50
Total Enrolled: 400
Most Popular: Business

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!