Problem swords
User vinitara
Submission Time 2025-02-18 23:57:59
Score 0
Max Time N/A
Max Memory N/A

Compile Error

swords.cpp: In function ‘int main()’:
swords.cpp:5:34: error: expected ‘;’ before ‘int’
5 | cin.tie(0) -> sync_with_stdio(0)
| ^
| ;
6 | int n, i, j, cnt=0, value;
| ~~~
swords.cpp:7:7: error: ‘n’ was not declared in this scope; did you mean ‘yn’?
7 | cin>>n;
| ^
| yn
swords.cpp:10:6: error: ‘i’ was not declared in this scope
10 | for(i=0;i<n;i++)
| ^
swords.cpp:14:6: error: ‘i’ was not declared in this scope
14 | for(i=n-1;i>=0;i--){
| ^
swords.cpp:17:4: error: ‘cnt’ was not declared in this scope; did you mean ‘int’?
17 | cnt++;
| ^~~
| int
swords.cpp:20:8: error: ‘cnt’ was not declared in this scope; did you mean ‘int’?
20 | cout<<cnt;
| ^~~
| int