Code:
#include<bits/stdc++.h>
using namespace std;
int main()
{
int testcase,cs,j,a,b,low,high;
int counter=0;
scanf("%d",&testcase);
for(cs=1; cs<=testcase; cs++)
{
int sum=0;
scanf("%d %d",&a,&b);
if(a>b)
{
low=b;
high=a;
}else{
low=a;
high=b;
}
for(j=low; j<=high; j++)
{
if(j%2!=0)
{
sum=sum+j;
}
}
printf("Case %d: %d\n",cs,sum);
}
return 0;
}