[Solved] C# logic (solution needed in coding) [closed]
The only tricky thing here is a comparison with tolerance, since because of round up errors you can well never meet answer == value condition. The implementation could be double answer = 300.0; double tolerance = 1e-10; while (true) { // based on previous answer we compute next one double value = 0.5 * (answer … Read more