Ad
Code
Diff
  • #!/bin/bash
    for i in $(eval echo {1..$3});
    do
    if [ $(( $i % ( $1*$2) )) -eq 0 ]
    then
    echo $i
    fi
    done
    • #!/bin/bash
    • for i in $(eval echo {1..$3});
    • do
    • if [ `expr $i % $1` -eq 0 -a `expr $i % $2` -eq 0 ]
    • if [ $(( $i % ( $1*$2) )) -eq 0 ]
    • then
    • echo $i
    • fi
    • done