.
.
.
代码展示如下:
#include<stdio.h>
int main()
{
int n,i,a,sum1=0,sum2=0;
scanf("%d",&n);
for(i=1;i<=n;i++){
scanf("%d",&a);
if(i%2!=0)sum1+=a;
else sum2+=a;
}
if(sum1>sum2)printf("Greater than");
else
if(sum1<sum2)printf("Less than");
else
printf("Equal");
}