#include <iostream>
signed main() {
setlocale(LC_ALL, "Rus");
int a, b, c, d, s, n;
std::cout << "Введите 4-ехзначное число: " << std::endl;
std::cin >> n;
a = n / 1000;
b = n % 100 / 10;
c = n % 10;
d = n / 100 % 10;
s = a * b * c * d;
std::cout << s << std::endl;
return 0;
}
#include <iostream>
signed main() {
setlocale(LC_ALL, "Rus");
int a, b, c, d, s, n;
std::cout << "Введите 4-ехзначное число: " << std::endl;
std::cin >> n;
a = n / 1000;
b = n % 100 / 10;
c = n % 10;
d = n / 100 % 10;
s = a * b * c * d;
std::cout << s << std::endl;
return 0;
}