作业帮 > 数学 > 作业

y=(a+b)x+b怎么算

来源:学生作业帮 编辑:大师作文网作业帮 分类:数学作业 时间:2024/11/14 16:10:01
y=(a+b)x+b怎么算
已知a的范围是80-88,b的范围是80-88,x1=0.5 x2=0.55 x3=0.6 x4=0.65 x5=0.7 x6=0.75 x7=0.8求y的解中出现最多的解,此算术很急,
y=(a+b)x+b怎么算
QB程序:Dim arn(9 * 9 * 7 + 1) nu = 0 For a = 80 To 88 For b = 80 To 88 For x = 0.5 To 0.8 Step 0.05 y = (a + b) * x + b arn(nu) = y nu = nu + 1 Next x Next b Next a Dim suarray(nu) For i = 0 To nu - 1 su = 0 For j = 1 + i To nu If arn(i) = arn(j) Then su = su + 1 End If Next j suarray(i) = su Next i For i = 0 To nu - 1 For j = i + 1 To nu If suarray(i) > suarray(j) Then mi = suarray(i) suarray(i) = suarray(j) suarray(j) = mi arn(j) = arn(i) End If Next j Next i Print arn(nu),suarray(nu) End 结果:168 出现3次