Math, asked by 123ishanchoudhary, 1 month ago

How to find number of squares between two numbers?

Answers

Answered by rupankgupta8
0

Answer:

We take floor of sqrt(b) because we need to consider

numbers before b.

We take ceil of sqrt(a) because we need to consider

numbers after a.

For example, let b = 24, a = 8. floor(sqrt(b)) = 4,

ceil(sqrt(a)) = 3. And number of squares is 4 - 3 + 1

= 2. The two numbers are 9 and 16.

Similar questions