githubNonFunziona/2-3-f.spp

12 lines
164 B
Plaintext
Raw Permalink Normal View History

2024-12-05 10:57:14 +00:00
#include <iostream>
int main() {
int a,b = 0;
std::cin >> a;
for(;a != 0;) {
b += a % 10;
a /= 10;
}
std::cout << b << "\n";
}