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