You are viewing a single comment's thread. Return to all comments →
int squares(int a, int b) { int count = 0; for(int i = 1;i<=sqrt(b);++i) { if(pow(i,2)>=a && pow(i,2)<=b) { count++; } } return count; }
Seems like cookies are disabled on this browser, please enable them to open this website
Sherlock and Squares
You are viewing a single comment's thread. Return to all comments →