朱色虫居
Pages
Home
Featured Posts
2006/10/04
10783-Odd Sum
/*
"Odd Sum"
Level:1.0
Date:2006/10/3
*/
#include
main(){
int n=0,a=0,b=0,sum=0,i=0,k=1;
scanf("%d",&n);
while(n-->0){
scanf("%d",&a);
scanf("%d",&b);
for(i=a;i<=b;i++){ if(i%2 != 0) sum+=i; } printf("Case %d: %d\n",k++,sum); sum=0; } }
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment