You are viewing a single comment's thread. Return to all comments →
That was actually very helpful. I was able to convert that idea into this code.
for(j=a[i]; j<b[i]; j++){ /* i<=t-1; */ c = sqrt(j); d = c*c; if(d==j){ s += 1; /* number of squares */ j = b[i]; } } while(d<=b[i]){ c++; d = c*c; if(d<=b[i]) s += 1; }
I didn't use /* text */ in my code. It's just there for understanding.
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 →
That was actually very helpful. I was able to convert that idea into this code.
I didn't use /* text */ in my code. It's just there for understanding.