My issue
My code
// Update your code below to solve the problem
#include <bits/stdc++.h>
using namespace std;
int main()
{
int t,i,score1=0,score2=0;
cin >> t;
while(t--)
{
int A[10];
for(i = 0; i < 10; i++)
{
cin >> A[i];
}
for(i=0;i<=10;i+=2)
{
score1=score1+A[i];
}
for(i=1;i<10;i+=2)
{
score2=score2+A[i];
}
if(score1>score2)
cout<<1<<endl;
else if(score1<score2)
cout<<2<<endl;
else
cout<<0<<endl;
}
}
Learning course: C++ for problem solving - 2
Problem Link: CodeChef: Practical coding for everyone