Răspuns:
1.
#include<bits/stdc++.h>
using namespace std;
int main()
{
int n,nr=0;
cin>>n;
while(n)
{
nr++;
n=n/10; }
cout<<nr;
return 0;
}
2.
#include<bits/stdc++.h>
using namespace std;
int main()
{
int n,p=1;
cin>>n;
while(n)
{
if((n%10)%2==1)
p=p*(n%10);
n=n/10;
}
cout<<p;
return 0;
}
3.
#include<bits/stdc++.h>
using namespace std;
int main()
{
int n,s=0;
cin>>n;
while(n)
{
n=n/10;
s=s+n;
}
cout<<s;
return 0;
}
Explicație:
Sper ca te-am ajutat!!