My output is coming right but i am not able to clear my test case

#include
using namespace std;
int main(){
int a[100];
int n;
cin>>n;
for(int k = 0;k<n;k++){
cin>>a[k];
}
int i = 0 ;
int j = n - 1;
while(i<j){
int start = a[i];
int end = a[j];
swap(start,end);
i++;
j–;
}
for(int k =0;k<n;k++){
cout<<a[k]<<endl;
}
return 0;
}

hi @discobot dont swap start and end rather change the content of array
like this

while(i<j){ 
		swap(a[i],a[j]); 
		i++; 
		j--; 
	} 

and print space not newline after each element

Hi! To find out what I can do, say @discobot display help.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.