Solved: Create a C program: Using arrays write a program t…

$30.00

Category:

Description

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.

 

Requirements:

  1. Properly document code using Coding standards.
  2. Use a 50 element integer type array for salaries.

3.Use 50 element char array for first and last names.

  1. Initialize all variables properly.
  2. 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.
  3. Output: After all of the teacher’s names and salaries are received, produce output as below:
  4. “Teacher 1: John Smith Salary(per year) : $80000 ” (note the tabbed output for readability)

b.” Teacher 2: Jane Tarzan Salary(per year) : $81000 ”

  1. ect.
  2. After all teachers have been output as above, the following line:
  3. “The average salary is $80000 per year”
  4. “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


error: Content is protected !!