Parallel Arrays, functions statements 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

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.

Parallel Arrays, functions statements for pseudocode

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

Comments

  • jamescarljamescarl Posts: 2Member
    In computer science and numerical computation, pseudocode is an informal high-level description of the operating principle of a computer program or other algorithm. It uses the structural conventions of a programming language, but is intended for human reading rather than machine reading. Pseudocode typically omits details that are not essential for human understanding of the algorithm, such as variable declarations, system-specific code and some subroutines. The programming language is augmented with natural language description details, where convenient, or with compact mathematical notation. The purpose of using pseudocode is that it is easier for people to understand than conventional programming language code, and that it is an efficient and environment-independent description of the key principles of an algorithm. It is commonly used in textbooks and scientific publications that are documenting various algorithms, and also in planning of computer program development, for sketching out the structure of the program before the actual coding takes place.
  • jamescarljamescarl Posts: 2Member
    cool man... great job.
    [url=http://www.gamechanger.nl/co-creatie/]Co-creatie[/url] is een interactief, creatief en sociaal
    proces waarbij een organisatie waarde cre
  • tonysometimestonysometimes Posts: 1Member
    A controversial group discussion topic is a speech topic that has many controversies, pros and cons. Keep in mind that all current group discussion topics are not my opinion, but just a sample list of speech topics!
    Focuses on small to medium size business create,
    deploy and optimize their sites for businesses.
    SEO Spokane
Sign In or Register to comment.