1. Not finding help here? Sign up for a free 30min tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Not sure how to start a Pseudo for an Array

  1. Oct 22, 2011 #1
    I am VERY new to this, i am trying to start a pseudo code write where i need to make an array. I have my flowchart done (at least i think i do ) but i am not sure how to actually start the code. The examples my teacher had are confusing and he is not answering my emails. I have to write pseudo for a count and averager for a test given to a class but the total count of tests done is not known. My issue to start is how i *actually* make the array list/space in pseudo. Any advise would be helpful and or examples of a start code with the array sections pointed out. Thank you.
     
  2. jcsd
  3. Oct 26, 2011 #2

    NascentOxygen

    User Avatar

    Staff: Mentor

    If you are using an array, then in most languages you will have to set aside a sufficiently-large array that it will be able to accommodate all expected data sets.

    Code (Text):
    mark: array 1..200 of real numbers;
    Then you'll read in marks one after another, until something indicates end of data
    Most languages have a character or key that serves this function, but you might choose to say that a negative number will be used to indicate end of data

    Code (Text):
    begin

    loop through this block
      read a number
      if number >=0 store it as a mark
         else end this loop and go to the next stage

    ....
    ....
    ....
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook