title: Square Root Of An Integer
signature: squareRootOfAnInteger :: Integer -> Integer
  squareRootOfAnInteger x = 
test_code: import Text.Printf
  import Control.Exception (catch, SomeException)
  import Data.Typeable
  import qualified Data.List as List
  import qualified Data.Map as Map
  import qualified Data.Set as Set
  
  -- SOLUTION CODE
  -- ============================================
  
  PLACEHOLDER_CODE_BODY
  
  -- TESTING CODE 
  -- ============================================
  validateSolution :: Integer -> Integer -> Bool
  validateSolution actual expected = do
      actual == expected
  
  
  driver :: Integer -> Integer -> String
  driver x expected = do
      if (validateSolution (PLACEHOLDER_FN_NAME x) expected)
          then "PASSED"
      else "FAILED"
  
  main = do
      printf "TEST-0...%s\n" (driver (89) (9) )
  
      printf "TEST-1...%s\n" (driver (11) (3) )
  
      printf "TEST-2...%s\n" (driver (14) (3) )
  
      printf "TEST-3...%s\n" (driver (92) (9) )
  
      printf "TEST-4...%s\n" (driver (76) (8) )
  
      printf "TEST-5...%s\n" (driver (63) (7) )
  
      printf "TEST-6...%s\n" (driver (51) (7) )
  
      printf "TEST-7...%s\n" (driver (16) (4) )
  
      printf "TEST-8...%s\n" (driver (83) (9) )
  
      printf "TEST-9...%s\n" (driver (66) (8) )
  
source_py: def square_root_of_an_integer(x):
      if ((x == 0) or (x == 1)):
          return x
      i = 1
      result = 1
      while (result <= x):
          i += 1
          result = (i * i)
      return (i - 1)
source_cpp: int square_root_of_an_integer(int x) {
    if ( x == 0 || x == 1 ) return x;
    int i = 1, result = 1;
    while ( result <= x ) {
      i ++;
      result = i * i;
    }
    return i - 1;
  }