Prime Numbers

Prime Numbers Prime Numbers

thales.doa.fmph.uniba.sk
from thales.doa.fmph.uniba.sk More from this publisher
10.12.2012 Views

544 Appendix BOOK PSEUDOCODE } ...; which means that x is checked for zero value upon entry of the whole loop, then all the interior tasks are to be performed until, after some complete pass of the interior tasks, x is found to be zero and that ends the while() looping. Operations that change the value of a single variable include these: x = x + c; // x is increased by c. x = cx; // x is multiplied by c. x = x3; // Shift right, same as x = ⌊x/8⌋. x = x ∧ 37; // Exclusive-or bits of x with 0 ...0100101 binary. x = x &37; // And bits of x with 0 ...0100101 binary. For() loops The for() loop is ubiquitous in this book, in being our primary automaton for executing tasks repeatedly. Again we defer to a set of examples, not trying rigorously to exhaust all possible forms of English-C loops possible, rather, covering some of the common styles appearing in the book. for(a ≤ x

Appendix BOOK PSEUDOCODE 545 for(j = q; j

Appendix BOOK PSEUDOCODE 545<br />

for(j = q; j

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!