Add tasks for all the new languages

This commit is contained in:
Tina Müller 2016-12-05 23:44:36 +01:00
parent 9dc3c2bb62
commit bba7bfd280
13208 changed files with 134745 additions and 0 deletions

View file

@ -0,0 +1,28 @@
public function boolean wf_iseven (long al_arg);return mod(al_arg, 2 ) = 0
end function
public function long wf_halve (long al_arg);RETURN int(al_arg / 2)
end function
public function long wf_double (long al_arg);RETURN al_arg * 2
end function
public function long wf_ethiopianmultiplication (long al_multiplicand, long al_multiplier);// calculate result
long ll_product
DO WHILE al_multiplicand >= 1
IF wf_iseven(al_multiplicand) THEN
// do nothing
ELSE
ll_product += al_multiplier
END IF
al_multiplicand = wf_halve(al_multiplicand)
al_multiplier = wf_double(al_multiplier)
LOOP
return ll_product
end function
// example call
long ll_answer
ll_answer = wf_ethiopianmultiplication(17,34)