Write a program in C# to prompt the user to enter the number of terms that this equation, math homework help
The English mathematician, John Wallis (1616-1703) discovered the following infinite product involving π:
2 2 4 4 6 6 8 π = 2 1 ⋅ 3 ⋅ 3 ⋅ 5 ⋅ 5 ⋅ 7 ⋅ 7
Write a program in C# to prompt the user to enter the number of terms that this equation should be evaluated to. Calculate and print the value of the equation to that number of terms. Compare the approximation to the value of pi using
π = 3.14159265358979323846.
After printing your result continue prompting the user for more input until the user enters a zero
for the number of terms.
Here is a typical output screen
.
This program calculates the value of pi based on an infinite series. by John Wallis in the 17th century.
Enter the number of terms to used…3
Using 3 the approximation to pi is 3.55555555555556 The error is approximately -0.413962901965762
Enter the number of terms to used...15_x000D_ Using 15 the approximation to pi is 3.24125187080898_x000D_ The error is approximately -0.0996592172191861_x000D_
Enter the number of terms to used...50_x000D_ Using 50 the approximation to pi is 3.1109451669015_x000D_ The error is approximately 0.0306474866882969_x000D_
Enter the number of terms to used...500_x000D_ Using 500 the approximation to pi is 3.1384588976716_x000D_ The error is approximately 0.00313375591819165_x000D_
Enter the number of terms to used...0_x000D_ Press any key to continue_x000D_
"You need a similar assignment done from scratch? Our qualified writers will help you with a guaranteed AI-free & plagiarism-free A+ quality paper, Confidentiality, Timely delivery & Livechat/phone Support.
Discount Code: CIPD30
Click ORDER NOW..


