Răspuns:
#include <iostream>
using namespace std;
int main()
{
int a, minim = 9999999, nr = 0;
cin >> a;
while(a)
{
if(a % 10 < minim)
minim = a % 10;
if(a % 10 % 2 == 0)
nr = nr * 10 + a % 10;
a /= 10;
}
cout << "Cifra minima = " << minim << '\n';
cout << "Nr format = " << nr;
return 0;
}
Explicație: