QUOTE(rickyg @ 27 Jan, 2008 - 08:20 PM)

Hi. Very new to the programming world. I have been asked to reverse a list with pseudocode. Using a function swap(), but with no need to define it, nor do I need to write the list, merely demonstrate an understanding by writing on paper a pseudocode which would reverse some implied list. I tried something like this, however, someone told me no good:
int main()
{
List.alist;
for(position = 1 through getLength())
swap(position(s), dataItem, success);
Display dataItem;
}
What you have posted I not think most really consider pseudo code. Everyone has their own way of writing their pseudo code (some make it very technical other make it simple). I normally write it so its almost like basic and really has no functional code in it. You are on the right track but I would say to remove the function (int main) and just leave the rest of the code. You can break it down even more but I think without the function it should be ok. It just depends on whom ever you are doing this for thinks pseudo code should be.