- 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.
3 Réponses
+ 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
}
0
thank you very much
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