Problem carpark
User undefinedcritter
Submission Time 2026-08-03 22:54:54
Score 0
Max Time N/A
Max Memory N/A

Compile Error

carpark.cpp: In function ‘int main()’:
carpark.cpp:9:13: error: two or more data types in declaration of ‘index’
9 | int int index=-1,temp=0;
| ^~~~~
carpark.cpp:9:22: error: two or more data types in declaration of ‘temp’
9 | int int index=-1,temp=0;
| ^~~~
carpark.cpp:13:16: error: ‘temp’ was not declared in this scope
13 | cin >> temp;
| ^~~~
carpark.cpp:15:18: error: no post-increment operator for type
15 | index++;
| ^~
carpark.cpp:21:33: error: invalid operands of types ‘<unresolved overloaded function type>’ and ‘int’ to binary ‘operator>=’
21 | if ((temp==0) && (index >=0) && (index < N-1) ) {
| ~~~~~~^~~
carpark.cpp:21:48: error: invalid operands of types ‘<unresolved overloaded function type>’ and ‘int’ to binary ‘operator<’