When Program Does Not Loop

Unfortunately, Will is right. Not only that, but the condition in line 140 that Z>0 means that when numbers are not swapped, the program does not loop back. The final output is therefore 41563 - not quite what you hoped for! (Unless working in ring of numbers modulo 4, in which case I suppose they are in ascending order; ignore this if you don't have a mathematical background!) This is probably not the best example of the kind of test you are trying to demonstrate.

Click here to post comments

Join in and write your own page! It's easy to do. How? Simply click here to return to views.

Recent Articles

  1. Emotional Intelligence Definition Evolution

    Oct 14, 19 06:41 AM

    Emotional intelligence definition has roots in the concept of intelligence quotient. However, modern psychologists take it quite differently.

    Read More

  2. Algebra aptitude tests, expressions, problems and formulae.

    Oct 14, 19 04:05 AM

    Algebra aptitude tests are meant to measure your understanding and interpretation of algebraic discipline.

    Read More

  3. The concept of IQ makes me want to die

    Oct 10, 19 01:57 PM

    The title of this comment says it all. I think I’m trash.

    Read More