Problem swapsort
User YongXin
Submission Time 2023-06-02 17:02:53
Score 0
Max Time N/A
Max Memory N/A

Compile Error

swapsort.cpp: In function ‘int main()’:
swapsort.cpp:7:7: error: ‘i’ was not declared in this scope
7 | for (i=0;i<n;++i) cin>>p[i];
| ^
swapsort.cpp:9:7: error: ‘i’ was not declared in this scope
9 | for (i=0;i<q;++i){
| ^
swapsort.cpp:12:5: error: invalid array assignment
12 | t=p;
| ^
swapsort.cpp:15:5: error: invalid array assignment
15 | p=t;
| ^
swapsort.cpp:18:7: error: ‘i’ was not declared in this scope
18 | for (i=0,i<n;++i) cout<<p[i];
| ^
swapsort.cpp:18:18: error: expected ‘;’ before ‘)’ token
18 | for (i=0,i<n;++i) cout<<p[i];
| ^
| ;