odd summation - wrong answer
i am trying to solve this problem. http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&category=&problem=1724&mosmsg=Submission+received+with+ID+10409586  but they keep sending me "Wrong Answer". It's an easy problem. And i think i am right. i can't find what's wrong here!

    #include<iostream>
    using namespace std;
    int main()
    {
        int testcase,x,y,temp,count,sum;
        while(cin>>testcase&& testcase>=0 && testcase<=100){
            count=0;
            while(count<testcase){
                if(cin>>y>>x){
                    if(!(x>=0&&x<=100&&y>=0&&y<=100)){break;}
                    else{
                        if(y>x){temp=x;x=y;y=temp;}
                        if(y%2==0){temp=y+1;}
                        else{temp=y;}
                        sum=0;
                        while(temp<=x){sum+=temp;temp+=2;}
                        cout<<"case"<<count+1<<":"<<sum<<"\n";
                    }
                }
                count++;
            }
        }
        return 0;
    }


is there any mistake in this code. or i am missing out something?? please help me!!
odd summation - wrong answer
===

i am trying to solve this problem. http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&category=&problem=1724&mosmsg=Submission+received+with+ID+10409586  but they keep sending me "Wrong Answer". It's an easy problem. And i think i am right. i can't find what's wrong here!

    #include<iostream>
    using namespace std;
    int main()
    {
        int testcase,x,y,temp,count,sum;
        while(cin>>testcase&& testcase>=0 && testcase<=100){
            count=0;
            while(count<testcase){
                if(cin>>y>>x){
                    if(!(x>=0&&x<=100&&y>=0&&y<=100)){break;}
                    else{
                        if(y>x){temp=x;x=y;y=temp;}
                        if(y%2==0){temp=y+1;}
                        else{temp=y;}
                        sum=0;
                        while(temp<=x){sum+=temp;temp+=2;}
                        cout<<"case"<<count+1<<":"<<sum<<"\n";
                    }
                }
                count++;
            }
        }
        return 0;
    }


is there any mistake in this code. or i am missing out something?? please help me!!