답안 #117251

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
117251 2019-06-15T12:10:20 Z maho04 scanf 함수 2 (BSC_0_4) C++14
컴파일 오류
0 ms 0 KB
include <iostream>
using namespace std;
int main(){
  int a;
  cin>>a;
  if(a<10)
  {
    cout>>("00");
  }
  else if(a<100)
  {
    cout>>("0");
  }
    cout>>a;
}

Compilation message

scanf2.cpp:1:1: error: 'include' does not name a type; did you mean '__has_include'?
 include <iostream>
 ^~~~~~~
 __has_include
scanf2.cpp: In function 'int main()':
scanf2.cpp:5:3: error: 'cin' was not declared in this scope
   cin>>a;
   ^~~
scanf2.cpp:5:3: note: suggested alternative: 'main'
   cin>>a;
   ^~~
   main
scanf2.cpp:8:5: error: 'cout' was not declared in this scope
     cout>>("00");
     ^~~~
scanf2.cpp:12:5: error: 'cout' was not declared in this scope
     cout>>("0");
     ^~~~
scanf2.cpp:14:5: error: 'cout' was not declared in this scope
     cout>>a;
     ^~~~