Stefan Evans wrote:
However I doubt you have covered loops in chapter one of your textbook. Presumably that solution will come later.
Yeah, that's coming later. The first chapter was basically about the history of Java, types of errors, and computer parts(CPU, Memory, output, input, etc).
Here's a new solution that I've created based off of the online solution I found:
The output is: 3.017071817071818 which is closer to pi than the online example I found.
Edit:
As I learn Java, I'll be able to easily do something like this in the future. Thanks for all the help everyone