fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. // your code goes here
  6. double x,y,t; int z,c ;
  7. do { cin >>x ;} while (x<=0);
  8. y=x; z=0;
  9. while (y>=1){y=y-1; z=z+1;}
  10. t=y ;c=0;
  11. do
  12. {
  13. t=t*10;
  14. while (t>=1){t=t-1;}
  15. c=c+1;
  16. while (t>0);
  17. cout <<z <<"."<< c<<endl;
  18.  
  19.  
  20.  
  21. return 0;
  22. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
1.25
compilation info
prog.cpp: In function 'int main()':
prog.cpp:22:1: error: expected 'while' at end of input
 }
 ^
prog.cpp:22:1: error: expected '(' at end of input
prog.cpp:22:1: error: expected primary-expression at end of input
prog.cpp:22:1: error: expected ')' at end of input
prog.cpp:22:1: error: expected ';' at end of input
prog.cpp:22:1: error: expected '}' at end of input
stdout
Standard output is empty