2018-09-26 15:44:36 +02:00
|
|
|
import java.util.Vector;
|
|
|
|
import java.lang.Integer;
|
|
|
|
|
2019-06-05 10:21:25 +02:00
|
|
|
|
|
|
|
public class VectorAdd {
|
|
|
|
vectorAdd(v1, v2) {
|
|
|
|
var i = 0;
|
|
|
|
var erg = new Vector<>();
|
|
|
|
while (i < v1.size()) {
|
|
|
|
erg.addElement(v1.elementAt(i) + v2.elementAt(i));
|
|
|
|
i++;
|
|
|
|
}
|
|
|
|
return erg;
|
2019-07-11 15:52:38 +02:00
|
|
|
}
|
2019-06-05 10:21:25 +02:00
|
|
|
}
|