Computer Science, asked by sangitajaiswal2903, 2 months ago

WAP to accept any number print the product of
all even
digits.​

Answers

Answered by Anonymous
0

Answer:

Print or return the product. Below is the solution to get the product of the digits: C++; Java; Python3; C#; PHP ...

Answered by ankitanshyadav2003
0

Explanation:

Get the number

Declare a variable to store the product and set it to 1

Repeat the next two steps till the number is not 0

Get the rightmost digit of the number with help of remainder ‘%’ operator by dividing it with 10 and multiply it with product.

Divide the number by 10 with help of ‘/’ operator

Print or return the product

Below is the solution to get the product of the digits:

Similar questions