use algorithmatic.com's in-browser integrated-development-environment here. The IDE offers syntax-highlighting, realtime validation, syntax-autocompletion, autocompletion for external-calls, interpreter and basic debugging.
Account
signin
algorithmatic.com uses OpenID - that means you don't need to register, probably you already have an OpenID, you just need to enable it. Click here to sign in
Nice to see you trying to reuse code yourself; however, writing a more specialized method for the task may have been more appropriate. Still effective though and fine for smaller scales. (Just the prime factorization method tests every prime for every possible occurrence and you just want the first prime less then or equal to the sqrt). Anyhow, wouldn't bother with it except for how much more work it's doing and for the fact that the general nature of Project Euler encourages optimization. The Code's simple though, that's good.