Arrays for pseudocode - Programmers Heaven

Howdy, Stranger!

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

Categories

Arrays for pseudocode

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.