for(int i=0;;i++)
{
int x=0,y=0;
scanf(“%d %d”,&x,&y);
if(x<=0||y<=0)
break;
else
{
if(x>y)
{
int t = x;
x = y;
y = t;
}
int sum = 0;
for(int j = x;j<=y;j++)
{
printf("%d ",j);
sum +=j;
}
printf("Sum=%d\n",sum);
}
}
//确定swap范围