javacc-7.0.1.test.tmp.Interpreter.sqrt.spl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of javacc Show documentation
Show all versions of javacc Show documentation
JavaCC is a parser/scanner generator for Java.
int val;
read val;
int sqrt;
sqrt = 1;
while (sqrt * sqrt <= val && ((sqrt + 1) * (sqrt + 1)) <= val)
sqrt = sqrt + 1;
write sqrt