"Krisitne" <me*********@dbforums.com> wrote in message
I need to use a for statement to write some pseudocode. I am not sure
how to actually write it - using a for loop. Could someone please give
me an example of what a for statment would look like in pseudocode?
pseudocode is a specification of an algorithm which is designed to be human-
rather than machine- readable.
How you would specify a for loop depends on your human audience. If they are
experienced C programmers, you would probably use the C syntax. On the other
hand if they are beginning programmers who are just learning about loops,
you would write something like.
counter is called i;
set i to initial value (usually zero)
loop label here:
do_something, possibly using i;
change i, (usually, add 1 to it)
if a condition involving i is true (usually, is i < N)
jump to loop label
for loop ends here.