A small simple that illustrates the problem would be helpful. It should be compilable and run but doesn't need all your program logic: it is enough to should show the declaration of result, and the...