fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. int number=1234;
  6. int i=0;
  7. int j=1;
  8. while (number/j != 0)
  9. {
  10. i++;
  11. j*=10;
  12. }
  13. cout << i;
  14. // your code goes here
  15. return 0;
  16. }
Success #stdin #stdout 0s 3296KB
stdin
Standard input is empty
stdout
4