how to find the number of perfect squares between 1 to n?
Answers
Answered by
1
Answer:
You need to check also if lower bound is a perfect square or not. If it is then add 1 to the difference. For example: Number of perfect squares between 1 and 100 is 10 - 1 = 9 . Since 1 is also a perfect square therefore add 1 and hence result will be 10
Similar questions