Closed egorsmkv closed 9 years ago
Bish-script:
def double(val) { return val * val; } for (i in 2 .. 4) { d = i * i; for (j in i .. d) { print(double(j/i+j*i)); } }
Bash-script:
#!/bin/bash # ... function bish_double () { echo $(($1 * $1)); exit; } function bish_main () { for i in $(seq 2 4); do d=$(($i * $i)); for j in $(seq "$i" "$d"); do bish_print "$(bish_double $(($(($j / $i)) + $(($j * $i)))))"; done; } done; } function bish_print () { echo $1; } bish_main;
Can you verify that it is fixed? Then I can close it.
@tdenniston Checked. Works without problems.
Bish-script:
Bash-script: