I'm trying to make a digit counter with loop. I am quite sure that my code is right, but the execution is different than what I wanted to. Can someone tell me where I did it wrong?
Here is my code
using namespace std;
long long x,y;
cout << "Input X : ";
cin >> x;
cout <<y<<" is made up of "<<i<<" digits."<<endl;
1234 in front of
12345000 is due to you having the
cout <<i statement at the end of your while loop.