Problem ping
User ryansoh
Submission Time 2023-07-13 13:15:01
Score 0
Max Time N/A
Max Memory N/A

Compile Error

ping.cpp: In function ‘int rabbit(int)’:
ping.cpp:7:12: error: ‘ping’ was not declared in this scope; did you mean ‘ping0’?
7 | int ping0=ping(0);
| ^~~~
| ping0
ping.cpp:9:5: error: expected ‘(’ before ‘ping0’
9 | if ping0>ping1:
| ^~~~~
| (
ping.cpp:11:2: error: ‘else’ without a previous ‘if’
11 | else:
| ^~~~
ping.cpp:11:6: error: expected primary-expression before ‘:’ token
11 | else:
| ^
ping.cpp: In function ‘int ping(int)’:
ping.cpp:16:15: error: ‘S’ was not declared in this scope
16 | return abs(x-S);
| ^