Not sure how to start a Pseudo for an Array

  • Thread starter Aoxx
  • Start date
  • #1
1
0
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.
 

Answers and Replies

  • #2
NascentOxygen
Staff Emeritus
Science Advisor
9,244
1,072
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:
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:
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

....
....
....
 

Related Threads on Not sure how to start a Pseudo for an Array

  • Last Post
Replies
9
Views
2K
  • Last Post
Replies
0
Views
939
Replies
4
Views
689
Replies
10
Views
908
Replies
1
Views
2K
Replies
3
Views
902
Replies
4
Views
2K
  • Last Post
Replies
1
Views
1K
Replies
1
Views
592
Top