1234567891011121314151617181920
#include <iostream> using namespace std; int main() { int n, digit, result=0, pow = 1; cin >> n; while (n) { digit = n % 10; n /= 10; if (digit % 2) { result += digit * pow; pow *= 10; } } cout << result << '\n'; }
x/=10;
x = x / 10;