You are viewing a single comment's thread. Return to all comments →
for anyone try in C++ :
int squares(int a, int b) { int count = 0; int i = sqrt(a); while(i <= sqrt(b)) { if(i*i >= a && i*i <= b) { count++; } i++; } return count; }
Sherlock and Squares
You are viewing a single comment's thread. Return to all comments →
for anyone try in C++ :
int squares(int a, int b) { int count = 0; int i = sqrt(a); while(i <= sqrt(b)) { if(i*i >= a && i*i <= b) { count++; } i++; } return count; }