Răspuns:
1.
include <iostream>
using namespace std
int main ()
{
int n, s=0;
cin>>n;
while (n>0)
{
s+=n%10;
n/=10;
}
cout<<s;
return 0;
}
2.
include <iostream>
using namespace std
int main()
{
int n,m,ogl=0;
cin>>n;
m=n;
while (n>0)
{
ogl = ogl*10 + n%10;
n/=10;
}
if (m==ogl) cout<<"Da";
else cout<<"Nu";
return 0;
}
Succes! ♡︎♥︎♡︎