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 majors and a count of the number of students enrolled in each major
You will need to use 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 column wide space
The "Percent" is printed after "Enrolled" to decimal places
There are no extra spaces between "Major", "Enrolled", and "Percent" except for the unused spaces within the column wide space
Output the total number of students enrolled and the major with the most students enrolled
You MUST write 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 #bold underlined text is what the user types:
Major Count? CompSci
Major Count? Math
Major Count? Business
Major Count? Nursing
Major Count? English
Major Enrolled Percent
CompSci
Math
Business
Nursing
English
Total Enrolled:
Most Popular: Business
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
