Untitled
unknown
plain_text
2 years ago
187 B
9
Indexable
#include<string>
#include <iostream>
using namespace std;
int main()
{
int a,b=0;
int i= 0;
cin >> a;
while (a>0) {
b += a % 10;
i++;
a /= 10;
}
cout << b;
}Editor is loading...