do/while loop

trying to make a neural network as in: C# Artificial Intelligence (AI) Programming: A Basic Object Oriented (OOP) Framework for Neural Networks

my do/while loop is crashing the system:

if i change the while to:

i get the results from hh, lh, hl, ll i want (hh<0.5, lh>0.5, hl>0.5, ll<0.5) for the other while loop to stop. So whats wrong? why does it crash if i ask for the result i get after running the do ca.100 times?

hmm on a second look at my result … hl stays < then 0.5 even after 10 000 iterations… :frowning: