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.

Click here to Download INSTANTLY!



How to "Maximize Your Intelligence"? Read FREE

Recent Articles

  1. Hello I did a iq test at Mensa and I got 200 score for it

    Oct 30, 16 07:50 AM

    Hey I am just wondering, I did a iq test at Mensa and I got 200 so I am a really high genius?

    Read More

  2. (My IQ Test Score

    Oct 14, 16 03:42 AM

    My name is Osuagwu Morris I scored 125 in my IQ Test. I am so much happy for the test scale says i am gifted and another scale says i am highly intelligent.

    Read More

  3. How is it calculated

    Aug 21, 16 06:58 AM

    I'm a 12 year old male and scored 145 on an iq test. I don't know exactly how they calculate the score though.

    Read More