Basic java using do while loop and actuallyoutput data. Pls don't use Math.sqrt or anythinglike it.
1. Make a guess at the answer (try squared / 2 as your initialguess).
2. Compute root = squared / guess .
3. Set guess = (guess + root) / 2 .
4. Start back at step 2 for as many iterations as necessary. Themore times steps 2 and 3 are repeated, the closer guess gets to thesquare root of squared.
Enter a double: 152415765.3 Square root of 152415765.300000 is 12345.68
Basic java using do while loop and actually output data. Pls don't use Math.sqrt or anything like it. 1. Make a guess at
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am