Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- int main()
- {
- int t,a,b,i,j,sum;
- while(scanf("%d",&t)==1)
- {
- for(i=1;i<=t;i++)
- {
- scanf("%d%d",&a,&b);
- if( a%2==1 && b%2==1)
- {
- j=a+2;
- for(j=a+2;j<=b;j=j+2)
- {
- sum=a+j;
- a=sum;
- }
- }
- printf("Case %d: %d\n",i,sum);
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement