You are viewing a single comment's thread. Return to all comments →
c#
public static int squares(int a, int b)
{ int lowestSquareRoot = (int)Math.Ceiling(Math.Sqrt((double)a)); int highestSquareRoot = (int)Math.Floor(Math.Sqrt((double)b)); return highestSquareRoot - lowestSquareRoot + 1; }
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 →
c#
public static int squares(int a, int b)