Find sum of digits of a number

Find sum of digits of a number. Say N = 3467, Output = 3 + 4 + 6 + 7 = 20

hello @dhruvk3k what doubt you have in this question ?

how to start this is a pseudocode question please provide me a hint or answer

@dhruvk3k you can do this by simply in the way like if there is a number x then you qill perform certain operations first you will take its modulus by 10 and then
you will take one variable and then you will add that digit after modulus in the variable and then you will divide by 10 .
this you will do until the n becomes equal.
like :
int x;
cin>>x;
int rem=0;
int digit=0;
while(x!=0){
rem=x%10;
digit+=rem;
x=x/10;
}
in this way you can do this .
Happy Learning !!