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