Submission #318452

# Submission time Handle Problem Language Result Execution time Memory
318452 2020-11-02T01:00:08 Z codemaster111 scanf 함수 4 (BSC_0_6) C++17
Compilation error
0 ms 0 KB
#include <iostream>
using namespace std;

int main() {
    int count=0;
    while(cin>>n) {
    	++count;
    }
    cout<<count;
}

Compilation message

scanf4.cpp: In function 'int main()':
scanf4.cpp:6:16: error: 'n' was not declared in this scope
    6 |     while(cin>>n) {
      |                ^