C++ Sum of Digit

#include<iostream>
using namespace std;
int main()
{
    int n, r, s = 0;

    cout << "Enter A Number : ";
    cin >> n;
    cout << endl;

    while(n != 0)
    {
        r = n % 10;
        s = s + r;
        n = n / 10;
    }

    cout << "Sum of Digit : " << s << endl;

    return 0;
}

Comments