Untitled

mail@pastecode.io avatar
unknown
c_cpp
7 months ago
175 B
0
Indexable
Never
#include <iostream>
using namespace std;
int main()
{
	int A, b;
	int i = 0;
	cin >> A >> b;
	while (A > 0)
	{
		A /= 10;
		i++;
		b += A%10;
	}
	cout << b;
	
}