Problem eight
User naivecyans
Submission Time 2025-06-16 16:19:14
Score 0
Max Time N/A
Max Memory N/A

Compile Error

eight.cpp: In function ‘int main()’:
eight.cpp:8:16: error: expected ‘;’ before ‘<’ token
8 | for(int i=0, i<n, i++){
| ^
| ;
eight.cpp:8:16: error: expected primary-expression before ‘<’ token
eight.cpp:8:23: error: expected ‘;’ before ‘)’ token
8 | for(int i=0, i<n, i++){
| ^
| ;
eight.cpp:9:10: error: no match for ‘operator==’ (operand types are ‘std::istream’ {aka ‘std::basic_istream<char>’} and ‘const char [2]’)
9 | if (cin=="8"){counter+=1;}
| ~~~^~~~~
| | |
| | const char [2]
| std::istream {aka std::basic_istream<char>}
In file included from /usr/include/c++/9/regex:62,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:110,
from eight.cpp:1:
/usr/include/c++/9/bits/regex.h:1026:5: note: candidat