Ethiopian multiplication: Difference between revisions
Content added Content deleted
Line 626: | Line 626: | ||
throw new Exception("muliplier cannot be negative"); |
throw new Exception("muliplier cannot be negative"); |
||
} |
} |
||
int doubleNum(int n) { return n * 2; } |
|||
int halveNum(int n) { return n / 2; } |
|||
bool isEven(int n) { return !(n % 2); } |
|||
int result; |
int result; |