C语言代码:
2007 c
[code]
#include<stdio.h>
int main()
{
int m,n;
int x=0,y=0;
int i,t;
while(scanf("%d%d",&m,&n)!=EOF){
if(m>n)
{t=m;m=n;n=t;}
for (i=m;i<=n;i++){
if(i%2==0)
x+=i*i;
else
y+=i*i*i;
}//for
printf("%d %d\n",x,y);
x=0;y=0;
}//while
return 0;
}//main
[/code]