Jak zmienić ten kod aby po indeksach nieparzystych były wyswietlane parzyste
#include <iostream>
using namespace std;
int a[1000000];
int b[1000000];
int main()
{
ios_base::sync_with_stdio(0);
cin.tie(0);
int d;
cin >> d;
for(int i=0; i<d; i++)
{
int n;
cin >> n;
for(int j=1; j<=n; j++)
{
int a[j];
cin >> a[j];
if (j%2!=0)
cout<<a[j]<<endl;
}
}
system("pause");
return 0;
}