Problem typicalstairs
User AltheaZ
Submission Time 2023-11-08 11:34:17
Score 0
Max Time N/A
Max Memory N/A

Compile Error

typicalstairs.cpp: In function ‘int main()’:
typicalstairs.cpp:11:8: error: ‘temp’ was not declared in this scope; did you mean ‘mktemp’?
11 | cin>>temp;
| ^~~~
| mktemp
typicalstairs.cpp: At global scope:
typicalstairs.cpp:14:5: error: expected unqualified-id before ‘if’
14 | if (a[0]==1) count[0]=0;
| ^~
typicalstairs.cpp:15:5: error: expected unqualified-id before ‘else’
15 | else count[0]=1;
| ^~~~
typicalstairs.cpp:16:5: error: expected unqualified-id before ‘if’
16 | if (a[1]==1) count[1]=1;
| ^~
typicalstairs.cpp:17:5: error: expected unqualified-id before ‘else’
17 | else count[1]=count[0]+1;
| ^~~~
typicalstairs.cpp:18:5: error: expected unqualified-id before ‘for’
18 | for (int i=2;i<n;i++){
| ^~~
typicalstairs.cpp:18:18: error: ‘i’ does not name a type
18 | for (int i=2;i<n;i++