#include <iostream>
int main()
{
int n;
std::cout << "Enter the number -> ";
std::cin >> n;
int p = 1;
while (n != 0) {
p *= n % 10;
n /= 10;
}
std::cout << "Product of numbers = " << p << std::endl;
system("pause");
return 0;
#include <iostream>
int main()
{
int n;
std::cout << "Enter the number -> ";
std::cin >> n;
int p = 1;
while (n != 0) {
p *= n % 10;
n /= 10;
}
std::cout << "Product of numbers = " << p << std::endl;
system("pause");
return 0;
}