C# program to calculate the average salary of people with university degrees, college diplomas, and high school
diplomas. Using a while loop, you are to process salary data until the user indicates that you should stop (there could be 0 or more data values). For each person processed, the program must first input an education type (char edType) ('U' or 'u' for university degrees, 'C' or 'c' for college diplomas, and 'H' or 'h' for high school) and then a salary (double salaryData). The program stops accepting input when the user enters a 'Q' or 'q' for quit (use a sentinel value while loop). Your main data processing loop should be conditioned on the fact that the user has not signalled quit. It might look something like:
while(char.ToUpper(edType) != 'Q')
This implies that like any sentinel value loop, you must seed the loop (input a value) PRIOR to entering the loop. Inside the loop the salary data is entered and processed. Once the main loop terminates, the average salary for each of the three education types should be printed out. Be sure to print an error message if the user enters an invalid education type or a negative salary.
I'm not sure how to set up the start of the code and the while loop.
Problem Statement The information of persons is entered into the system. For a particular person, the information contains... View the full answer