Untitled
// 1 #include <iostream> using namespace std; int main() { int a; cin >> a; int t = 0; while (a != 0) { t += a % 10; a /= 10; } cout << t; return 0; }
// 1 #include <iostream> using namespace std; int main() { int a; cin >> a; int t = 0; while (a != 0) { t += a % 10; a /= 10; } cout << t; return 0; }