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. How to Take a Career Aptitude Test?

    Jun 12, 18 02:53 PM

    When you take a career aptitude test, you aim to determine the right career path and how your personality traits, knowledge and skills will help you succeed in your career.

    Read More

  2. What may you expect from a verbal intelligence test?

    Jun 04, 18 03:07 PM

    A true verbal intelligence test should have various characteristics including reality, validity, objectivity, practicability, and norms.

    Read More

  3. Love the COLOR test

    Jun 02, 18 03:11 PM

    I love your description of the COLOR personalities!!!

    Read More