Given two given integers N1 and N2, find the number of perfect squares from N1 to N2 (N1 and N2 inclusive). Write a function that accepts the integers N1 and N2. The function should return the count of perfect squares from N1 to N2. in c++ code example
Example: all perfect squares up to n
def perfect_squares(minimum, maximum) :
number = ceil(sqrt(minimum));
n2 = number * number;
number = (number * 2) + 1;
while ((n2 >= minimum and n2 <= maximum)) :
print(n2, end= " ");
n2 = n2 + number;
number += 2;