Răspuns:
21)
#include <iostream>
using namespace std
int main ()
{
int x cin >> x
x= x/100+(x+10)%10+x%10
cout<<x<<endl
return 0
}
22)
#include <iostream>
using namespace std
int main ()
{
cin>>n
s=1
for (i=1 i<=n i++)
{
s=s*1
s=s%10
}
cout <<s
return 0