Write an algorithm to find the product of
digits in
in a given number ?
Answers
Answered by
8
Answer: General Algorithm for product of digits in a given number:
1] Get the number.
2] Declare a variable to store the product and set it to 1.
3] Repeat the next two steps till the number is not 0.
4] Get the rightmost digit of the number with help of remainder '%' operator by dividing it with 10 and multiply it with product.
I Hope It Help You :-)
Answered by
0
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
Similar questions