Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
186 B
4
Indexable
Never
#include <iostream>
using namespace std;
int main()
{
	int a;
	cin >> a;
	int count = 0;
	int c=0;
	while (a > 0){
		c += a % 10;
		a /= 10;


		count++;
	}
	cout <<c ;
}