int x,y;
scanf(“%d%d”,&x,&y);
if(x>y){
int t = x;
x = y;
y = t; }
int sum=0;
int i =x+1;
while(i<y)
{
if(i%2)sum += i;
i++;
}
printf("%d",sum);
//注意交换swap函数,另外int sum =0;
//注意i = x+1;if(i%2)sum +=i;i++,满足间距为1;
//注意用纸张来勾画思路