Hello all,
I;m a beginner C++ and I;m trying to convert some pseudocode into C++. Its
pseudo code of the peterson algorithm for N-processes.
I almost converted the whole code. But the last lines are very hard.
This is the pseudo code:
for [ k=1 to n except k==i ]
This is pretty simple code although I don;t know how to convert in into c++
because of the except in the pseudocode. for [k=1 to n] to c++ is for
(k=1;k<n;k++). i dont understand it because of the except.
Is there anyone who can tell me what the C++ code is for the above pseudo
code?
I;ve another little bit more complex part of pseudocode as well
wait until ((for all k<>i q[k]<j) or (turn[j]<>i)).
Is there anyone who can give me the c-code for one of this pseudo codes ? I
would be very gratefull if anyone can translate one of the pseudocodes. this
one is the most important
for [ k=1 to n except k==i ]
many many thanks!!!!