# Thread: help ..please help me doing this .....problem.

1. ## help ..please help me doing this .....problem.

Suppose L is a LIST and p, q, and r are positions. As a function of n, the length of list L, determine how many times the functions FIRST, END, and NEXT are excused by the following program.

p := FIRST(L);
while p <> END(L) do begin
q := p;
while q <> END(L) do begin
q := NEXT(q,L);
r := FIRST(L);
while r <> q do
r := NEXT(r,L);
end;
p := NEXT(p,L);
end;

I need to know what eaxctly meant by the brackets
<> .... q<>END(L) does it mean as long as q is not at the end of the list?? please help!!!! 2. > q<>END(L) does it mean as long as q is not at the end of the list?
That would be my guess.

But this looks like Pascal to me

It isn't C for sure... 3. ## What language are using? Doesn't look like C nor C++ to me.... 4. Pascal.

The <> means !=

Quzah. 5. <>

This is also != in VB, too. 6. Now, please tell me what != means ......
When it's written
while r <> q do
what exactly it means ..please 7. First off, you're on a C board. That code is Pascal. You're in the wrong place. Second, if you don't know what "!=" means, then you're still in the wrong place.

It means "not equal". In other words: r is not equal to q.

Quzah. 8. Thanks a lot.  9. Um...what language are you trying to do this code in? This can be done in C, but you are not showing any signs that you know C. Do you? Because we can help out, if you a have the basics of the language. Popular pages Recent additions 