School Assignment? Project Due Tomorrow? Chat LIVE With A Programming Expert!

Welcome to Dream.In.Code
Become an Expert!

Join 300,416 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 1,565 people online right now. Registration is fast and FREE... Join Now!




Will someone look over a pseudocode for salary

 

Will someone look over a pseudocode for salary, list emplyees and salary find mean, and numbers below and above

confusedbycode

23 Apr, 2009 - 09:43 AM
Post #1

New D.I.C Head
*

Joined: 16 Apr, 2009
Posts: 6

Here is what I have the question is to input a list of emplyee names and saleris, and determine the mean (average) salary as well as the number of saleries above and below the average. This is to be in pseudocode.

I appreciate the assistance
[Main module

Declare Names[100], Salaries[100]
Set Sum = 0
Set Count1 = 0
Set K = 1
Write “Enter Employees Name and Salary.”
Write “Enter ,0 when done.”
Input Names[K], Salary[X]
While Salary[X] <> 0
Set Count1 = Count1 + 1
Set X[Count1] = Salary
Set Sum = Sum + Salary
Write “Enter another Employee Name and Salary (enter ,0 when done)”
Input Names[K], Salary[X]
End While
Set Average = Sum / Count1
Set Count2 = 0
For K = 1 Step 1 to Count1
If X[K] > Average Then
Set Count2 = Count2 + 1
Below_average = X[K] < Average
If X[K] < Average, Then
Set Count2 = Count 2 + 1, Below_average,
Declare Below_average as integer
Above_average =X[K] > average
If X[K] > Average, Then
Set Count2 = Count 2 – 1, Above_average
Declare Above_average as integer
End If
End If

Write “Average is”
Write “Below average is”
Write “ above average is”

End ]



User is offlineProfile CardPM
+Quote Post


mattman059

RE: Will Someone Look Over A Pseudocode For Salary

23 Apr, 2009 - 12:08 PM
Post #2

D.I.C Addict
Group Icon

Joined: 23 Oct, 2006
Posts: 537



Thanked: 8 times
Dream Kudos: 225
My Contributions
What would be the most helpful is if you could put some indentation in your code like

CODE

while Salary[X] <> 0
      other stuff happens
end while


That way we (and you) can read it better
User is offlineProfile CardPM
+Quote Post

confusedbycode

RE: Will Someone Look Over A Pseudocode For Salary

23 Apr, 2009 - 04:30 PM
Post #3

New D.I.C Head
*

Joined: 16 Apr, 2009
Posts: 6

I had them indented, for some reason when I copied and pasted it to this form it took out the indents.
Dose my Code look right?


QUOTE(mattman059 @ 23 Apr, 2009 - 12:08 PM) *

What would be the most helpful is if you could put some indentation in your code like

CODE

while Salary[X] <> 0
      other stuff happens
end while


That way we (and you) can read it better


User is offlineProfile CardPM
+Quote Post

IngeniousHax

RE: Will Someone Look Over A Pseudocode For Salary

29 Apr, 2009 - 09:58 PM
Post #4

D.I.C Addict
****

Joined: 28 Mar, 2009
Posts: 607



Thanked: 14 times
My Contributions
QUOTE(confusedbycode @ 23 Apr, 2009 - 04:30 PM) *

I had them indented, for some reason when I copied and pasted it to this form it took out the indents.
Dose my Code look right?


QUOTE(mattman059 @ 23 Apr, 2009 - 12:08 PM) *

What would be the most helpful is if you could put some indentation in your code like

CODE

while Salary[X] <> 0
      other stuff happens
end while


That way we (and you) can read it better



Not bad, but try wrapping it in code tags, so some fancy colors come up up and the indentation issue more than likely won't happen.
User is offlineProfile CardPM
+Quote Post

Steve_Schlotterer

RE: Will Someone Look Over A Pseudocode For Salary

28 May, 2009 - 02:25 PM
Post #5

New D.I.C Head
*

Joined: 18 May, 2009
Posts: 12


My Contributions
I tried my best to read your code without proper indentation, but it's tough to grasp (particularly towards the end where you declare above & below average as integers).

Try implementing this pseudocode into a programming language of your choice, then test it and debug if necessary).

Or repost this pseudocode with proper indentation using the code tags in the toolbar above the text editor input box.

I'll be glad to step through the pseudocode when it's easier to read.

Steve
User is offlineProfile CardPM
+Quote Post

Pwn

RE: Will Someone Look Over A Pseudocode For Salary

9 Jun, 2009 - 03:43 PM
Post #6

D.I.C Regular
***

Joined: 25 Nov, 2007
Posts: 360



Thanked: 13 times
My Contributions
Judging from the title, I thought this was a job offer.
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic

Time is now: 11/7/09 11:31PM

Live Help!

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter Fan Us On Facebook

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month