Submission #318452

#TimeUsernameProblemLanguageResultExecution timeMemory
318452codemaster111scanf 함수 4 (BSC_0_6)C++17
Compilation error
0 ms0 KiB
#include <iostream>
using namespace std;

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

Compilation message (stderr)

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