Q:

(Approximatep) p can be computed using the following formula:

0

(Approximatep) p can be computed using the following formula:

Write a program that displays the result of

and

Use 1.0 instead of 1 in your program.

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

public class Exercise_01_07{
	public static void main(String[] args) {
		System.out.println(4 * (1.0 - (1 / 3) + (1 / 5) -
						  (1 / 7) + (1 / 9) - (1 / 11)));
		System.out.println(4 * (1.0 - (1 / 3) + (1 / 5) - (1 / 7)
						   + (1 / 9) - (1 / 11) + (1 / 13)));
	}
}

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now