odd summation - wrong answer
<p>i am trying to solve this problem. <a href="http://uva.onlinejudge.org/index.php?option=com_onlinejudge&amp;Itemid=8&amp;page=show_problem&amp;category=&amp;problem=1724&amp;mosmsg=Submission+received+with+ID+10409586" rel="nofollow">http://uva.onlinejudge.org/index.php?option=com_onlinejudge&amp;Itemid=8&amp;page=show_problem&amp;category=&amp;problem=1724&amp;mosmsg=Submission+received+with+ID+10409586</a>  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!</p>

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

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