Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

448
Views
¿En Javascript cómo Multiplicamos dos dígitos sin usar el operador de multiplicación?
over 4 years ago · Hanz Gallego
1 answers
Answer question

0

var increase = 0;

var result = 0;

var counter = 0;

var array = new Array();

function returnMultiplication(){

number1 = document.getElementById('number1_entered').value

number2 = document.getElementById('number2_entered').value

array1 = number1.split("")

array2 = number2.split("")

if(array1.length > 3 || array2.length > 3){

alert("You can not enter numbers with more than 3 digits");

}

else{

for(i=array2.length; i>=0; i--){

result = 0

multiplication_number1 = array1[i];

for(j= array1.length; j>=0; j--){

if(increase == 0){

multiplication_number2 = array1[j]

result = multiplication_number1 + multiplication_number2;

}

else{

multiplication_number2 = array1[j]

result = increase + multiplication_number1 + multiplication_number2;

}

if(result > 9){

increase = result-9

}

else{

increase = 0;

}

}

array.push(result);

counter += 1;

}

}

}

over 4 years ago · DAMASO DAVID GARCIA LLANOS Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!