JustAnswer > Computer
Ask A Question|Register|Login|Help
JustAnswer

Computer

Ask a Computer Question, Get an Answer ASAP!

Have your own Computer question?

11 Tech Support Specialists are Online Now
characters left:
Not a Computer Question?
Bookmark and Share

Question

Can anyone develop a pseudocode for the following.

Submitted: 465 days and 10 hours ago.
Category: Computer
Value: $15
Status: CLOSED
+
Read More

Optional Information

OS: Windows XP; Browser: IE

Already Tried:
Input a list of employee names and salaries, and determine the
mean (average) salary as well as the number of salaries above and
below the mean



can you develop a pseudocode for the above

Answer

Hi,

 

BEGIN PROCEDURE

 

Dimension eName as string array

Dimension eSalary as floating

Dimension counter as integer

Dimension eSum as floating

Dimension eMean as floating

Dimension eAbove as integer

Dimension eBelow as integer

 

Set counter to 0

Do While entry not blank

Read employee name

Set name to array variable eName()

Read employee salary

Set salary to array variable eSalary()

counter = counter + 1

End Do

 

Set eSum to 0

For i = 1 to counter

eSum = eSum + eSalary(i)

Next i

eMean = eSum/counter

 

Set eAbove to 0
Set eBelow to 0

For j = 1 to counter
If eSalary(j) > eMean Then

eAbove=eAbove +1

End If

If eSalary(j) < eMean Then

eBelow=eBelow+1

End If

Next j

 

Print "Mean Salary = ", eMean

Print "Number of salaries above mean = ", eAbove

Print "Number of salaries below mean = ", eBelow

 

END PROCEDURE

 

 

Hope this helps. Let me know if you have any questions.

 



Edited by John D on 8/16/2008 at 12:07 PM

Picture
Expert: John D
Pos. Feedback: 99.2 %
Accepts: 
Answered: 8/16/2008

BS Degree in Engineering.

25 years experience in computer programming and troubleshooting. Planning & Construction Management

+
Read More

Related Computer Questions

  • How do I scan on an X2580?
  • I check out the sites that are posted on here, but they are
  • Hi THis is h3c3, the guy with the Winbook xl3 problem. Hve
  • why cant i get access to iwon.comgames
  • DC jack has got loose inside laptop. How do I get the comput...
  • somehow my printer has been lost LexmarkX125..I do not have
  • I use Aol isp and on cod waw i always get bad connection fro...
  • I have forgotten my password.



Disclaimer: Information in questions, answers, and other posts on this site ("Posts") comes from individual users, not JustAnswer; JustAnswer is not responsible for Posts. Posts are for general information, are not intended to substitute for informed professional advice (medical, legal, veterinary, financial, etc.), or to establish a professional-client relationship. The site and services are provided "as is" with no warranty or representations by JustAnswer regarding the qualifications of Experts. To see what credentials have been verified by a third-party service, please click on the "Verified" symbol in some Experts' profiles. JustAnswer is not intended or designed for EMERGENCY questions which should be directed immediately by telephone or in-person to qualified professionals.
Question List | Become an Expert | Terms of Service | Security & Privacy | About Us
© 2003-2009 JustAnswer Corp.