Computer Science, asked by mohakagr2010, 9 months ago

W.A.P to accept a number from the user and calculate the product of prime digit. plz answer correct program i will mark it as brainliest.

Answers

Answered by Hamdanbro
1

Answer:

General Algorithm for product of digits in a given number:

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:

Explanation:

Similar questions