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

Compile Error

ping.cpp: In function ‘int rabbit(int)’:
ping.cpp:7:2: error: ‘ping0’ was not declared in this scope
7 | ping0=ping(0);
| ^~~~~
ping.cpp:7:8: error: ‘ping’ was not declared in this scope
7 | ping0=ping(0);
| ^~~~
ping.cpp:8:2: error: ‘ping1’ was not declared in this scope
8 | ping1=ping(1);
| ^~~~~
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);
| ^
ping.cpp:16:17: error: expected ‘}’ at end of input
16 | return abs(x-S);
| ^
ping.cpp:15:17: note: to match this ‘{