2022-10-12 09:04:35 -03:00
|
|
|
function plus(a,b) {
|
|
|
|
for (let i=0; i < a; i++){
|
|
|
|
b++;
|
|
|
|
}
|
|
|
|
return b;
|
|
|
|
}
|
|
|
|
|
|
|
|
function mult(a,b) {
|
|
|
|
sum=0;
|
|
|
|
for(let i=0; i < a; i++) {
|
|
|
|
sum = plus(sum, b)
|
|
|
|
}
|
|
|
|
return sum;
|
|
|
|
}
|
|
|
|
|
|
|
|
function minus(a,b) {
|
2022-10-12 11:10:43 -03:00
|
|
|
for (let i=0; i < b; i++){
|
|
|
|
a--;
|
2022-10-12 09:04:35 -03:00
|
|
|
}
|
2022-10-12 11:10:43 -03:00
|
|
|
return a;
|
2022-10-12 09:04:35 -03:00
|
|
|
}
|
|
|
|
|
|
|
|
exports.plus = plus;
|
|
|
|
exports.mult = mult;
|
|
|
|
exports.minus = minus;
|