" Life is not a problem to be solved but a reality to be experienced! "
© Copyright 2013 - 2024 KUDO.TIPS - All rights reserved.
using namespace std;
int main() {
int liczba, suma=0;
cin >> liczba;
while (liczba > 0) {
suma += liczba % 10;
liczba /= 10;
}
cout << suma;
return 0;
}