Compute the approximate nth root of x

Assignment Help Basic Computer Science
Reference no: EM13210194

Problem: Given a positive integer n and a positive integer x compute the approximate nth root of x. Pseudo-code: double Nroot (integer n, integer x){ integer loGuess=1; integer hiGuess = x; guess = average of loGuess and hiGuess; loop while guess^n is not within 1 of x if guess < guess^n then loGuess = guess else hiGuess=guess guess = average of loGuess and hiGuess; endLoop return guess Write this program in Java and completely analyse. PS. please send me the answer not an example!

Reference no: EM13210194

Questions Cloud

How many doughnuts will you consume : You work on a doughnut farm--you grow doughnuts. In each period, you are able to grow 20 doughnuts. If you go to the coffee & doughnut exchange, you may buy and sell doughnuts for $1 each, and buy and sell coffee for $2 each.
Explain the sign contains neon at a pressure : A neon is made of glass tubing whose inside diameter is 2.5 cm and whose length is 5.5 m. If the sign contains neon at a pressure of 1.73 torr at 31 degrees celcius
Write a c++ code that includes the following operations : Write a C++ code that includes the following operations: z=x * y z=z + 5.0 x, y, and z are floating point variables. A function (subroutine) named GetData should be declared to get data (x and y) from keyboard. The call by reference mechanism shou..
History of islam : History of Islam before the 1300's, the Spread of Islam, life of the Prophet Muhammad, or any related topics. Feel free to ask any questions, and also let me know your selection via email.
Compute the approximate nth root of x : Problem: Given a positive integer n and a positive integer x compute the approximate nth root of x.
State standard reduction potentials be arbitrarily assigned : why must one half reaction in the table of standard reduction potentials be arbitrarily assigned a value of 0 volts? why were not all of the half cell potentials
Determine how many cups of coffee could you buy : You work on a doughnut farm--you grow doughnuts. In each period, you are able to grow 20 doughnuts. If you go to the coffee & doughnut exchange, you may buy and sell doughnuts for $1 each, and buy and sell coffee for $2 each.
Determine the number of sub strings : Determine the number of sub strings that start with the character 'I' and end with 'E' in the word below. Show all the work. I N T E L L I G E N C E
What are three different ways atmospheric can find : What are three different ways atmospheric [CO2] can be determined? Under what circumstances would you chose to utilize

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Intelligent systems for health maintenance organization

Aacquiring a company in the health maintenance organization (HMO) field. DSS, ES, ESS, or intelligent systems can be used in such a situation.

  Write a program that will define the f string manipulation

1.) Write a program that will define the following string manipulation functions. Each is analogous to thecorresponding C++ string function.

  Which processes were loaded normally is running in safe

Next, boot the system into safe Mode and use Task Manager to list running processes. Which processes that were loaded normally are not loaded when the system is running in safe Mode?

  Compute hash for nifty hash function

Bob allots the numeric value VChar to each letter in alphabet equal to letter's position in alphabet, i.e., VA = 1, VB = 2, ..., VZ = 26. For the message, he computes the hash.

  Add the form which includes richtextbox control

Add the form which includes RichTextBox control and several predefined template letters. This part of program would be used to write letters to your customers.

  Translate the following function into mips assembly language

Translate the following function into MIPS assembly language

  Cultural factors contribute to success of nanotechnology

What is the Nanotechnology, and identify the cultural factors that may contribute to the success or failure of this technology.

  Web service management

How is Web service management different from conventional distributed computing  systems management?

  Provide permission to get financial amounts

System to have employees register and provide permission to get financial amounts from dental insurance and retirement companies.

  What advice would you give the managers of this company

What advice would you give the managers of this company? What would be the best storage system for their needs and why?

  Design the logic for a program

Using Visual Logic: Design the logic for a program that allows a user to entry 15 numbers, then displays each number and its difference from the numeric average of the numbers entered.

  How effective leader can manage changes for new technology

Write down separate 350-word document which explains how the effective leader can manage changes implementing this new technology might need.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd