#include <iostream>
#include <string>
using namespace std;
int main()
{
int number;
float answer = 1;
cout << "Input number? ";
cin >> number;
while (number > 0)
answer *= (number % 10);
number /= 10;
}
std::cout << answer;
#include <iostream>
#include <string>
using namespace std;
int main()
{
int number;
float answer = 1;
cout << "Input number? ";
cin >> number;
while (number > 0)
{
answer *= (number % 10);
number /= 10;
}
std::cout << answer;
}