Home do-while loop starts at zero
 What I'm aiming at is systematically increase the value of e1 from -1 to 0 in steps of 0.001. And with each value of e1, compute variable uNew with increasing values of the variable r by dr = 0.01 until r = 25; But the energy keeps starting at zero instead of -1, And I can't figure out how to implement it, also, should I use two For loops?  for(int i = 0; i < 1000 ; i++) { do { e1 = e1 + 0.001; }while(e1 < 0 ); r = i*dr; uNew = 2*u1-u0+dr*dr*(2/r - 2*e1)*u0; dr += 0.01; u0 = u1; u1 = uNew; }