18 Sum of Digits Problem Solving C++ 6 lines Copy 1 2 3 4 5 6 int n = 1234, sum = 0; while(n > 0){ sum += n % 10; n /= 10; } cout << sum; // 10