- #1

- 416

- 0

Design an algorithm which calculates the greatest natural number less than or equal to

the square root of the input variable i.

can smby pls explain to me what does this ques mean??if possible explain using some example

thanx

You are using an out of date browser. It may not display this or other websites correctly.

You should upgrade or use an alternative browser.

You should upgrade or use an alternative browser.

- Thread starter teng125
- Start date

- #1

- 416

- 0

Design an algorithm which calculates the greatest natural number less than or equal to

the square root of the input variable i.

can smby pls explain to me what does this ques mean??if possible explain using some example

thanx

- #2

0rthodontist

Science Advisor

- 1,230

- 0

Here are some examples of what your algorithm should do:

sqrt(1) = 1

sqrt(2) = 1

sqrt(3) = 1

sqrt(4) = 2

sqrt(5) = 2

sqrt(57) = 7

sqrt(170) = 13

- #3

- 416

- 0

what can i write for sqrt(i) in the pseudo code for pascal??

is it just sqrt(i) or any others??

is it just sqrt(i) or any others??

Share: