How JustAnswer Works:

  • Ask an Expert
    Experts are full of valuable knowledge and are ready to help with any question. Credentials confirmed by a Fortune 500 verification firm.
  • Get a Professional Answer
    Via email, text message, or notification as you wait on our site.
    Ask follow up questions if you need to.
  • 100% Satisfaction Guarantee
    Rate the answer you receive.

Ask LogicPro Your Own Question

LogicPro
LogicPro, Engineer
Category: Homework
Satisfied Customers: 9668
Experience:  Expert in Java C++ C C# VB Javascript Design SQL HTML
29751445
Type Your Homework Question Here...
LogicPro is online now
A new question is answered every 9 seconds

In Pseudocode write a program that inputs a list of employees

Resolved Question:

In Pseudocode write a program that inputs a list of employees names and salaries, and determine the mean(average) salary as well as the number of salaries above and below the mean.
Program should consist of two matching arrays and counts of data. Calculations of data based on the array will be the final output to the user.
Submitted: 1 year ago.
Category: Homework
Expert:  LogicPro replied 1 year ago.
Hi,
Welcome back. Hope you are doing well.
What is the deadline for this?
Customer: replied 1 year ago.

9/11/2013

Expert:  LogicPro replied 1 year ago.
ok, I will provide you answer ASAP.
Expert:  LogicPro replied 1 year ago.
Download answer from here: SalaryAveragePseudocode.docx

You can ask me again using "For LogicPro only" at the start of your questions like other customers to get instant answers.
It will ensure that question is for me.
Please bookmark my profile page:
http://www.justanswer.com/homework/expert-logicpro/
so you can come back and ask me a question anytime.

Remember, if for any reason you are unsatisfied with my answer, we can continue the conversation until you’re satisfied and rate my answer as excellent. I can address follow up questions on original requirements at no extra charge and I’m always here to help.
Thank you for using JustAnswer!
Customer: replied 1 year ago.

LogicPro,


 


There were a couple of statements in your code that we do not use. For I = 0 to N-1 and the Next statement. See my comments within the code. Thank you for help and prompt response.


 


Start



  1. 1. Declare N as Integer = 20 //number of employees

  2. 2. Declare Names[N] as String //array to hold names of employees

  3. 3. Declare Salary[N] as Float //array to hold salaries of employees

  4. 4. Declare TotalSalary as Float //variable to store total salary

  5. 5. Declare AverageSalary as Float //variable for average salary

  6. 6. Declare CountAboveSalaries as Integet = 0

  7. 7. Declare CountBelowSalaries as Integer = 0

  8. 8. Declare I as Integer

  9. 9. For I = 0 to N-1 ***I do not recognize this statement from what is being taught in the book. Is This a For Loop? The syntax we use is like: For (I = 0; I < Count; Count++) Can you rewrite it using a For Loop or a While Loop?***


//prompt user to input employee name and salary



  1. a. Display “Enter employee name: ”

  2. b. Input Names

  3. c. Display “Enter employee salary: ”

  4. d. Input Salary


//calculate total salary



  1. e. TotalSalary = TotalSalary + Salary

  2. 10. Next i I do not recognize this statement either


//calculate average salary



  1. 11. Set AverageSalary = TotalSalary / N


//count salaries above and below the mean



  1. 12. For I = 0 to N-1*** Again, please use a for loop to count***

    1. a. If (Salary < AverageSalary) Then



i. Set CountBelowSalaries = CountBelowSalaries + 1



  1. b. Else


i. Set CountAboveSalaries = CountAboveSalaries+ 1



  1. c. End If

  2. 13. Next i ***?***


//display results



  1. 14. Display “Mean (Average) Salary: ”, AverageSalary

  2. 15. Display “Number of Salaries above mean: ”, CountAboveSalaries

  3. 16. Display “Number of Salaries below mean: ”, CountBelowSalaries


End



Thank you for your quick reply. I am learning that pseudocode can be written in different ways which can make it hard on you to write it the way it is done from one book to another. Below is an example of how the book I am studying loads an array:



Write "Enter a positive number or 0 to quit"


Input TempNum


While TempNum != 0


If TempNum < 0 Then


Write "You must enter a positive number, please try again"


Else


Set Num[Count] = TempNum


Set Count = Count + 1


End If


Write " Enter another number or enter 0 to quit"


Input TempNum


End While



Your way to code might be better, I do not know. I just want to be as consistent as possible.

Expert:  LogicPro replied 1 year ago.
I will review and reply ASAP.
Expert:  LogicPro replied 1 year ago.
THIS ANSWER IS LOCKED!
You can view this answer by clicking here to Register or Login and paying $3.
If you've already paid for this answer, simply Login.
LogicPro, Engineer
Category: Homework
Satisfied Customers: 9668
Experience: Expert in Java C++ C C# VB Javascript Design SQL HTML
LogicPro and 2 other Homework Specialists are ready to help you

JustAnswer in the News:

 
 
 
Ask-a-doc Web sites: If you've got a quick question, you can try to get an answer from sites that say they have various specialists on hand to give quick answers... Justanswer.com.
JustAnswer.com...has seen a spike since October in legal questions from readers about layoffs, unemployment and severance.
Web sites like justanswer.com/legal
...leave nothing to chance.
Traffic on JustAnswer rose 14 percent...and had nearly 400,000 page views in 30 days...inquiries related to stress, high blood pressure, drinking and heart pain jumped 33 percent.
Tory Johnson, GMA Workplace Contributor, discusses work-from-home jobs, such as JustAnswer in which verified Experts answer people’s questions.
I will tell you that...the things you have to go through to be an Expert are quite rigorous.
 
 
 

What Customers are Saying:

 
 
 
  • Wonderful service, prompt, efficient, and accurate. Couldn't have asked for more. I cannot thank you enough for your help. Mary C. Freshfield, Liverpool, UK
< Last | Next >
  • Wonderful service, prompt, efficient, and accurate. Couldn't have asked for more. I cannot thank you enough for your help. Mary C. Freshfield, Liverpool, UK
  • This expert is wonderful. They truly know what they are talking about, and they actually care about you. They really helped put my nerves at ease. Thank you so much!!!! Alex Los Angeles, CA
  • Thank you for all your help. It is nice to know that this service is here for people like myself, who need answers fast and are not sure who to consult. GP Hesperia, CA
  • I couldn't be more satisfied! This is the site I will always come to when I need a second opinion. Justin Kernersville, NC
  • Just let me say that this encounter has been entirely professional and most helpful. I liked that I could ask additional questions and get answered in a very short turn around. Esther Woodstock, NY
  • Thank you so much for taking your time and knowledge to support my concerns. Not only did you answer my questions, you even took it a step further with replying with more pertinent information I needed to know. Robin Elkton, Maryland
  • He answered my question promptly and gave me accurate, detailed information. If all of your experts are half as good, you have a great thing going here. Diane Dallas, TX
 
 
 

Meet The Experts:

 
 
 
  • Manal Elkhoshkhany

    Tutor

    Satisfied Customers:

    4522
    More than 5000 online tutoring sessions.
< Last | Next >
  • http://ww2.justanswer.com/uploads/BU/BusinessTutor/2012-2-2_115741_Kouki2.64x64.jpg Manal Elkhoshkhany's Avatar

    Manal Elkhoshkhany

    Tutor

    Satisfied Customers:

    4522
    More than 5000 online tutoring sessions.
  • http://ww2.justanswer.com/uploads/ComputersGuru/2010-02-13_051118_Photo41.JPG LogicPro's Avatar

    LogicPro

    Engineer

    Satisfied Customers:

    3458
    Expert in Java C++ C C# VB Javascript Design SQL HTML
  • http://ww2.justanswer.com/uploads/LI/lindaus/2012-6-10_04811_IMG20120609164157.64x64.jpg Linda_us's Avatar

    Linda_us

    Finance, Accounts & Homework Tutor

    Satisfied Customers:

    3124
    Post Graduate Diploma in Management (MBA)
  • http://ww2.justanswer.com/uploads/chooser77/2009-08-18_162025_Chris.jpg Chris M.'s Avatar

    Chris M.

    M.S.W. Social Work

    Satisfied Customers:

    2385
    Master's Degree, strong math and writing skills, experience in one-on-one tutoring (college English)
  • http://ww2.justanswer.com/uploads/JawaadAhmed/2009-6-27_12137_SIs_SHadi.jpg F. Naz's Avatar

    F. Naz

    Chartered Accountant

    Satisfied Customers:

    1988
    Experience with chartered accountancy
  • http://ww2.justanswer.com/uploads/JK/jkcpa/2011-1-16_182614_jkcpa.64x64.jpg Bizhelp's Avatar

    Bizhelp

    CPA

    Satisfied Customers:

    1876
    Bachelors Degree and CPA with Accounting work experience
  • http://ww2.justanswer.com/uploads/avremote/photoa.jpg Seanna's Avatar

    Seanna

    Tutor

    Satisfied Customers:

    1781
    3,000+ satisfied customers, all topics, A+ work
 
 
 

Related Homework Questions