#include <iostream>
using namespace std;
int num,dividenum=1,modulusnum,sum=0;
int main(){
cout<<"enter a five digit number "<<endl;
cin>>num;
while(dividenum!=0){
dividenum=num/10;
modulusnum=num%10;
num=dividenum;
sum+=modulusnum;
}
cout<<"the sum of integers of a number = "<<sum<<endl;
}
EmoticonEmoticon