编写函数fun其功能是:求1到w之间的奇数 数之和.(w是100〈=w〈=1000的整数)

来源:学生作业帮助网 编辑:作业帮 时间:2024/05/05 18:53:53
编写函数fun其功能是:求1到w之间的奇数 数之和.(w是100〈=w〈=1000的整数)

编写函数fun其功能是:求1到w之间的奇数 数之和.(w是100〈=w〈=1000的整数)
编写函数fun其功能是:求1到w之间的奇数 数之和.(w是100〈=w〈=1000的整数)

编写函数fun其功能是:求1到w之间的奇数 数之和.(w是100〈=w〈=1000的整数)
int fun(w)
{
int sum = 0;
for(int i = 1 ; i