Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Facebook Sign In with Google Sign In with OpenID

Categories

We have migrated to a new platform! Please note that you will need to reset your password to log in (your credentials are still in-tact though). Please contact lee@programmersheaven.com if you have questions.
Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Arrays and functions for psudocode

bilzorabilzora Posts: 5Member
How do I count loops . Maybe I'm using the wrong terms. How do I trace loops? It is Pseudocode not Java. I know it is hard for subject matter experts to 'dumb' down for someone like me but I do need help. I've tried several tutorials still in trouble. Thanks for your help.

a. Show the pseudocode declarations needed to declare two arrays - one an array which contains the names of the family members, and the other an array which contains the savings (i.e. money) held by each family member. The arrays are parallel arrays because the savings shown in the second array for a certain array position are the savings for the family member whose name appears in the same position in the first array.

This is what I put:

Declare Names (10) as Strings
Declare Savings, Total as Float
Declare K as integer[/I]

b. Write a function, which is called from the main module - this function will determine and return the total savings.

I went by an example that was in the book but would like to shorten this. Dont know if its right.

Declare totalSavings as float
Declare K as Int
Set K = 0
Set totalSavings = femaleSiblings(Savings)
Function femaleSavings(Savings) as float
Set femaleSavings = 0
For (K = 0, K<10, K++)
Write
Sign In or Register to comment.