commit 62ff6038924263d14e65c3ded8d3ecd9187cdd00 parent c11e5ec3b8f394afda7ffcaf2ff3aebca599f43b Author: Agastya Chandrakant <acagastya@outlook.com> Date: Mon, 16 Apr 2018 22:16:01 +0530 add Diffstat:
M | s4/fafl/report.md | | | 4 | +++- |
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/s4/fafl/report.md b/s4/fafl/report.md @@ -40,7 +40,9 @@ What the TM is doing can be summed up in the following JavaScript code snippet: ``` function checkPrime(num) { var div = Math.floor(num/2); - while(div > 2) { + if(div == 0) + return 0; + while(div > 1) { if(num % div == 0) return 0; div = div - 1;