Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

help with C++ please Substituting these formulas, the Newton-Raphson update rule for computing the n' root of any value K is: 2+1 = - na-T

image text in transcribedhelp with C++ please

Substituting these formulas, the Newton-Raphson update rule for computing the n' root of any value K is: 2+1 = - na"-T Write a program that includes a user-defined function named root that will calculate and return the nth root of any value using the Newton-Raphson method described above: double rootN(double x, int n); The function takes two arguments: a (type double) value > 0 and an integer root > 1. This function should work exactly as your Babylonian square root, but using the more generalized update rule. Do not use any math library functions in your solution. [Hint: it will be very helpful if you also construct a separate function to computex"] Your main program should take as input positive values for K and n, then call the rootN function to determine and display the root of the input value. Include a continuation loop that will continue this process as long as the user wishes. Examples: enter value and root: 92 the root is: 3.00002 continue? (y): y enter value and root: 93 the root is: 2.08008 continue? (y): y enter value and root: 94 the root is: 1.73207 continue? (y): n

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

1. Explain why strategic planning is important to all managers.

Answered: 1 week ago

Question

What is the environment we are trying to create?

Answered: 1 week ago

Question

How can we visually describe our goals?

Answered: 1 week ago