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. What?!

    Apr 02, 19 01:31 PM

    No way are loads of you getting 160+. Einstein's was 160 and mine is 145. Did you all do your tests on the same website? If so it must be REALLY inaccurate

    Read More

  2. Wrong Reply!

    Apr 02, 19 01:24 PM

    Question 7: If a cube has all sizes of equal size, and you have a block that has a side that is 20cm long then the smallest cube that you make has to

    Read More

  3. Im Apparently 125 and Higher

    Jan 11, 19 02:16 PM

    Im a 15 year old in high school and I took a test that said I had an IQ of 125 or higher meaning university level, But in high school im failing all most

    Read More