Design an algorithm for computing |sqrtn| for any positive integer n. Besides assignment and comparsion, your algorithm may only use the four basic arithmetical operations.

Cabiolab

Cabiolab

Answered question

2021-01-13

Design an algorithm for computing |sqrtn| for any positive integer n. Besides assignment and comparsion, your algorithm may only use the four basic arithmetical operations.

Answer & Explanation

2k1enyvp

2k1enyvp

Skilled2021-01-14Added 94 answers

Something like this ought to function:  i=0, while (i×in)

i=i+1, answer =i1,

Do you have a similar question?

Recalculate according to your conditions!

Ask your question.
Get an expert answer.

Let our experts help you. Answer in as fast as 15 minutes.

Didn't find what you were looking for?