int i = 1; double answer = 1; while (i < upperValueAsFloat) { answer = answer - (1/(i*2)); i++; }