please check my CHEFA code

c-plus-plus
check
chefa

#1

#include
#include
using namespace std;

int main() {
int t;
long int j,n,i,chef,a[100000];
cin>>t;
while(t–)
{
cin>>n;
j=(n+1)%2;
chef=0;
for(i=0;i<n;i++)
cin>>a*;
sort(a,a+n);
for(i=0;i<n;i++){
if(i%2==j)
chef+=a*;
}
cout<<chef<<endl;

}
return 0;

}


#2

What is

cin="">>a*;

Its my first time seeing it.

I think thats your error. The program ran when I changed it to cin>>a*;