Problem | staircase |
---|---|
User | Daddy |
Submission Time | 2023-12-02 13:16:43 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
staircase.cpp: In function ‘int main()’:
staircase.cpp:7:8: error: ‘a’ was not declared in this scope
7 | cin>>a[i];
| ^
staircase.cpp:9:7: error: ‘a’ was not declared in this scope
9 | sort(a.begin(), a.end());
| ^
staircase.cpp:9:2: error: ‘sort’ was not declared in this scope; did you mean ‘qsort’?
9 | sort(a.begin(), a.end());
| ^~~~
| qsort
staircase.cpp:10:2: error: ‘j’ was not declared in this scope
10 | j=0;
| ^
staircase.cpp:12:10: error: condition declares an array
12 | if(int a[i]==j){
| ^
staircase.cpp:14:16: error: condition declares an array
14 | }else if(int a[i]==j+1){
| ^
staircase.cpp:19:16: error: expected ‘}’ at end of input
19 | }cout<<j<<endl;
| ^
staircase.cpp:3:11: note: to match this ‘{’
3 | int main(){
| ^