Sample Header Ad - 728x90

Trying to complete Project Euler #5, passes all syntax checks but doesn't work

-1 votes
2 answers
228 views
trying to complete Project Euler #5 . The code I have should logically work, and it passes ShellCheck, but gives no output for some reason. The code is below. Thanks and sorry if this should be in a different stack exchange site #!/bin/bash i=1 while [[ $((i % 2)) -eq 0 && $((i % 3)) -eq 0 && $((i % 5)) -eq 0 && $((i % 7)) -eq 0 && $((i % 11)) -eq 0 && $((i % 13)) -eq 0 && $((i % 17)) -eq 0 && $((i % 19)) -eq 0 ]] do i=$((i+1)) done echo $i
Asked by Egrodo (207 rep)
Nov 23, 2016, 06:59 PM
Last activity: Sep 13, 2022, 07:43 PM