#define _CRT_SECURE_NO_WARNINGS #include<stdio.h> int main() { int a=10000; int sum = 0; for (; a < 100000; a++) { sum = 0; for (int i = 10; i <= 10000; i *= 10) { sum += (a % i) * (a / i); } if (sum == a) printf("%d ", a); } return 0; }