Jump to content

Ethiopian multiplication: Difference between revisions

(Added Ela)
Line 2,513:
 
=={{header|Rascal}}==
<lang Rascal>import IO;
import IO;
 
public int halve(int n) = n/2;
Line 2,520 ⟶ 2,519:
public int double(int n) = n*2;
 
public bool uneven(int n) {= (n % 2) != 0);
 
public bool uneven(int n) {
if((n % 2) == 0)
return false;
else return true;
}
 
public int ethiopianMul(int n, int m) {
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.