Solved: Create a C program: Using arrays write a program t…
Create a C program: Using arrays write a program that reads and displays teachers salaries and names and average median salary. In addition display the teachers with the top and bottom salaries.
- Properly document code using Coding standards.
- Use a 50 element integer type array for salaries.
3.Use 50 element char array for first and last names.
- Initialize all variables properly.
- Input: Read the first and last name for each teachers and their yearly salary until a blank line is inputted for the teachers first name. A blank first name will end of the input.
- Output: After all of the teacher’s names and salaries are received, produce output as below:
- “Teacher 1: John Smith Salary(per year) : $80000 ” (note the tabbed output for readability)
b.” Teacher 2: Jane Tarzan Salary(per year) : $81000 ”
- After all teachers have been output as above, the following line:
- “The average salary is $80000 per year”
- “The top salary is Jane Tarzan at $81000”
iii. “The bottom salary is John Smith at $80000”
7.Sort the output ascending by salary using the bubble sort algorithm.
Show transcribed image text