早教吧 育儿知识 作业答案 考试题库 百科 知识分享

1.把区间[0,10]10等分,求函数y=(2x+1)^2+|x-2|在各等分点处的函数值,写出算法语句

题目详情
1.把区间[0,10]10等分,求函数y=(2x+1)^2+|x-2|在各等分点处的函数值,写出算法语句
▼优质解答
答案和解析
十等分点分别是1,2,3,4..7,8,9
10
25
50
83
124
173
230
295
368
#include
#include
using namespace std;
int vabs(int x){return x>0?x:-x;}
int main(void)
{
\x09int x,y;
\x09for(x=1;x