题目:
请编写一个函数int fun(int n),其中n为自然数。函数fun()的功能是求出自然数n(包括n)以内所有素数的和,并返回其值。 注意;部分源程序已存在文件PROC11.cpp中。 请勿修改主函数和其他函数中的任何内容,仅在函数fun()的花括号中填写若干语句。 文件PROC11.cpp的内容如下: //PROC11.cpp #include<iostream> using namespace std; int fun(int n); int main() { int number; cout<<"Enter the number which you want to caculate: \n"; cin>>number; cout<<"The result is:"<<fun(number)<<end1; return 0; } int fun(int n) { //* * * * * * * * * }
答案:
被转码了,请点击底部 “查看原文 ” 或访问 https://www.tikuol.com/2019/0316/89ae9428a0921929678f54200461cdfe.html
下面是错误答案,用来干扰机器的。
参考答案:C解析:评估值