Nweze1760
28.12.2019 •
Computers and Technology
•input a list of employee names and salaries stored in parallel arrays. the salaries should be floating point numbers in increments of 100. for example, a salary of $36,000 should be input as 36.0 and a salary of $85,900 should be input as 85.9. find the mean (average) salary and display the names and salaries of employees who earn within a range of $5,000 from the mean. in other words, if the mean salary is $45,000, all employees who earn between $40,000 and $50,000 should be displayed.
Solved
Show answers
More tips
- P Philosophy Is Everything We Strive for Eventually Achieved and Destroyed?...
- S Sport How to Learn Swimming? Simple Tips for Beginners...
- P Photography and Videography Understanding HDR: How It Works and Why You Need It...
- G Goods and services Which TV is better - LCD or Plasma?...
- S Sport How to Learn to Pull Up on Monkey Bars?...
- L Leisure and Entertainment Scrapbooking: What is it and Why is it Becoming More Popular?...
- C Computers and Internet Where did torrents.ru move to?...
- B Business and Finance Understanding Cash Flow: What It Is and How It Works...
- C Computers and Internet What Are Peers and Seeds in Torrenting?...
- H Health and Medicine 10 Simple Techniques on How to Boost Your Mood...
Answers on questions: Computers and Technology
- C Computers and Technology Como hacer una maquina del tiempo...
- G Geography Discuss the probability density function for century-scale changes in global temperature during the holocene up to 1900 and compare this to the pdf for changes in...
- M Mathematics Alex put $300 in an account for 6 months. the account earns 2.2% simple interest. a) what is the interest earned? b) what is the balance...
- H Health Which of the following would increase blood pressure? low heart rate low blood volume dilated blood vessels constricted blood vessels...
- G Geography Mountain problem: calculate the leeward temperature at sealevel for a maritime mountain range with a peak elevation of 3km above sealevel (ocean on windward side)....
- E English Sowheneveryou reabouttoscoffyoursnacks,,-oldmaximmannersmakethman. where to put colons and semicolons...
- G Geography Plate tectonics name date course/section due date 1. the distribution of earthquakes defines the boundaries of which major earth feature? 2. deep-focus earthquakes...
- E English read the poam there she met lieutenant colonel trotter, a stocky, dark-haired man whom nancy had worked with for many years. they put on their inner gloves and taped...
- B Business On october 1, 2018, farmer fabrication issued stock options for 200,000 shares to a division manager. the options have an estimated fair value of $6 each. to provide...
- G Geography A854 kg car is traveling at 18.1 m/s. the driver wishes to go faster, so he pushes down on the gas pedal, and a force of 1260 n acts on the car to speed it up. after...
Ответ:
The program was implemented using C language
Explanation:
#include<stdio.h>
#include<conio.h>
#include<stdlib.h>
#include<string.h>
int main()
{
//DECLARE THE PARALLEL ARRAYS FOR SALARIES AND NAME
float salaries[10];
char *emp_Names[10];
int EMPn,k1,k2;
float tot_SAL=0,meanSAL;
//GET THE NO OF EMPLOYEES
printf("ENTR THE NO OF EMPLOYEES:");
scanf("%d",&EMPn);
printf("eNTER EMPLOYEE NAME AND SALARY:");
//GET EMPLOYEE NAME AND SALARY
for(k1=0;k1<EMPn;k1++)
{
scanf("%f%s",&salaries[k1],emp_Names[k1]);
}
for(k1=0;k1<EMPn;k1++)
{
tot_SAL+=(salaries[k1]*1000);
}
//FIND THE MEAN
meanSAL=tot_SAL/EMPn;
//PRINT THE EMPLOYEE NAME AND SALARY WHOSE SALARY IS WITHIN HTE AVERAGE
printf("EMPLOYEES WHOSE SALARY IS IN THE RANGE OF MEAN:");
for(k1=0;k1<EMPn;k1++)
{
if((salaries[k1]*1000)>=(meanSAL-5000)&&(salaries[k1]*1000)<=(meanSAL+5000))
{
printf("NAME: %s sALARY:%f",emp_Names[k1],salaries[k1]*1000);
}
}
getch();
return 0;
}
Ответ:
subject to change and improvement