Submission #1282010

#TimeUsernameProblemLanguageResultExecution timeMemory
1282010ojiscanf 함수 3 (BSC_0_5)C++20
Compilation error
0 ms0 KiB
#include<bits/stdc++.h> using namespace; int main(){ int a; cin >> a; if(a<100){ cout << a << endl; } }

Compilation message (stderr)

scanf3.cpp:2:16: error: expected identifier before ';' token
    2 | using namespace;
      |                ^
scanf3.cpp: In function 'int main()':
scanf3.cpp:5:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 |     cin >> a;
      |     ^~~
      |     std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:146,
                 from scanf3.cpp:1:
/usr/include/c++/13/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
scanf3.cpp:7:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    7 |     cout << a << endl;
      |     ^~~~
      |     std::cout
/usr/include/c++/13/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
scanf3.cpp:7:18: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    7 |     cout << a << endl;
      |                  ^~~~
      |                  std::endl
In file included from /usr/include/c++/13/bits/unique_ptr.h:42,
                 from /usr/include/c++/13/memory:78,
                 from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:56:
/usr/include/c++/13/ostream:735:5: note: 'std::endl' declared here
  735 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~