- 1

JavaScript product

Hello everyone who can help me with this? Insert a number. Calculate product and sum of the digits of the number. If product is divisible by the sum, print the quotient, otherwise print the remainder.

23rd Aug 2019, 7:42 PM
Dav
Dav - avatar
3 Respuestas
+ 1
Heres the pseudo code x =prompt(“number”) x2 = prompt.... let sum = x + x2 product = x * x2 if prod / sum { log.... } else { log prod % sum }
23rd Aug 2019, 8:34 PM
Ole113
Ole113 - avatar
0
thank you very much
23rd Aug 2019, 8:35 PM
Dav
Dav - avatar
0
but actually, the solution should be like this: Input 1233 Output 1*2*3*3=18 and 1+2+3+3=9 if 18%9==0 alert smth
23rd Aug 2019, 8:41 PM
Dav
Dav - avatar