Problem | staircase |
---|---|
User | Daddy |
Submission Time | 2023-12-02 13:18:10 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
staircase.cpp: In function ‘int main()’:
staircase.cpp:12:2: error: ‘j’ was not declared in this scope
12 | j=0;
| ^
staircase.cpp:14:10: error: condition declares an array
14 | if(int a[i]==j){
| ^
staircase.cpp:16:16: error: condition declares an array
16 | }else if(int a[i]==j+1){
| ^
staircase.cpp:21:16: error: expected ‘}’ at end of input
21 | }cout<<j<<endl;
| ^
staircase.cpp:4:11: note: to match this ‘{’
4 | int main(){
| ^
In file included from /usr/include/c++/9/algorithm:62,
from staircase.cpp:2:
/usr/include/c++/9/bits/stl_algo.h: In instantiation of ‘void std::__insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]’:
/usr/include/c++/9/bits/stl_algo.h:1890:25: required from ‘void std::__fina