fork download
  1. #include <iostream>
  2. #include <cmath>
  3.  
  4.  
  5.  
  6. int main() {
  7. int x;
  8. cin >> x;
  9. cout << (x==0? 1: int (log10 (x) + 1));
  10. return 0;
  11. }
Compilation error #stdin compilation error #stdout 0s 3460KB
stdin
570320
compilation info
prog.cpp: In function 'int main()':
prog.cpp:8:2: error: 'cin' was not declared in this scope
  cin >> x;
  ^
prog.cpp:8:2: note: suggested alternative:
In file included from prog.cpp:1:0:
/usr/include/c++/5/iostream:60:18: note:   'std::cin'
   extern istream cin;  /// Linked to standard input
                  ^
prog.cpp:9:2: error: 'cout' was not declared in this scope
  cout << (x==0? 1: int (log10 (x) + 1));
  ^
prog.cpp:9:2: note: suggested alternative:
In file included from prog.cpp:1:0:
/usr/include/c++/5/iostream:61:18: note:   'std::cout'
   extern ostream cout;  /// Linked to standard output
                  ^
stdout
Standard output is empty