Jump to content

Ethiopian multiplication: Difference between revisions

Line 623:
=={{header|D}}==
<lang d>int ethiopian(int n1, int n2) {
if (n1 < 0) {
throw new Exception("muliplier cannot be negative");
}
static int doubleNum(int n) { return n * 2; }
static int halveNum(int n) { return n / 2; }
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.