C program to find the product of digits of a number

Write a C program that takes a positive number N and produces an output that is the product of its digits.


Explanation:
Take number 657.
Answer expected : 6 * 5 * 7 = 210
Constraint:
1<=N<=999999
Input: A single number
Output:  The value
Example 1:
Input: 657
Output: 210
Example 2:
Input: 7
Output: 7

Implementation: