函数方法求奇数和代码不能正常退出
#include<stdio.h>int even(int number);
int main(void)
{
int number,sum;
sum=0;
printf("输入要求和的奇数:");
scanf("%d",&number);
even(number);
printf("求和结果是:%d",sum);
return 0;
}
int even(int number)
{
int sum;
sum=0;
if(number>=0){
while(number/2==0){
sum=number+sum;
}
}
else
return 0;
return sum;
}
求大佬指点