Răspuns :
#include <iostream>
using namespace std;
int main(){
int n, k=0, s=0;
cin>>n;
while(n)
{
if(n%10%2)
{
s+=n%10;
k++;
}
n/=10;
}
cout<<s/k;
return 0;
}
using namespace std;
int main(){
int n, k=0, s=0;
cin>>n;
while(n)
{
if(n%10%2)
{
s+=n%10;
k++;
}
n/=10;
}
cout<<s/k;
return 0;
}
#include <iostream>
using namespace std;
int main()
{
int n, k=0, s=0;
cin>>n;
while(n)
{
if(n%10%2==1)
{
s=n%10;
k++;
}
n/=10;
}
cout<<s/k;
return 0;
}
using namespace std;
int main()
{
int n, k=0, s=0;
cin>>n;
while(n)
{
if(n%10%2==1)
{
s=n%10;
k++;
}
n/=10;
}
cout<<s/k;
return 0;
}