Ethiopian multiplication: Difference between revisions

(Removed all PL/pgSQL and second R example marked incorrect for several months.)
Line 671:
{{works with|Java|1.5+}}
<lang java5>import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;
public class Mult {
Line 678 ⟶ 679:
int second = sc.nextInt();
 
HashMapMap <Integer, Integer> columns = new HashMap <Integer, Integer>();
columns.put(first, second);
do{
Line 687 ⟶ 688:
 
int sum = 0;
for(intMap.Entry <Integer, Integer> entry firstNum: columns.keySetentrySet()){
if(!isEven(firstNumentry.getKey())){
sum += columnsentry.getgetValue(firstNum);
}
}
Anonymous user