#include <iostream>
using namespace std;
int num;
int number(int num);
int main(){
for(int x=0;x<=10;x++){
cout<<"enter a five digit number "<<endl;
cin>>num;
cout<<x<<" = ";
int as=number(num);
cout<<as<<endl;
}
}
int number(int num){
if(num==0){
return 0;
}
else{
return (num%10)+number(num/10);
}
}
EmoticonEmoticon