C program to count the perfect squares between a range

Write a program to find the number of perfect squares between given two numbers A and B (both inclusive). A number is called a perfect square if it can be written as x*x for some integer x.

Input: Two numbers A and B separated by a space

Output: Count of the number of perfect squares


Example 1:
Input: 3 10
Output: 2

Example 2:
Input: 16 70
Output: 5

Implementation: