Untitled
Anonymous
c_cpp
10/15/2023 9:49 AM
236 B
20
Indexable
#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;
}Editor is loading...