cin>>a>>b>>c>>d;
a)
if(a>9)
cout<<a%9;
a/=10;
if(b>9)
cout<<b%9;
b/=10;
if(c>9)
cout<<c%9;
c/=10;
if(d>9)
cout<<d%9;
d/=10;
b) pt. primul nr, adica a (indentic si pt celelalte)
int maxcif=0;
while(a)
{ if(maxcif>a%10)
cout<<maxcif<<" ";
else
maxcif=a%10;
a/=10;
}
c) pt nr a (identic si pt celelalte)
int d, s=0;
for(d=2; d<=a/d; d++)
{if(a%d==0)
s+=d;
a/=d;
}
Eu asa cred ca se face.