早教吧作业答案频道 -->其他-->
excel宏程序X1=31,X2=65X3=30~43之间的整数,X4=88~124之间的整数X5=14~18之间的整数,或等于27,X6,X7=10,或14~18之间的整数,X8=34~38之间的整数,或等于40,k=(x1*x3*x5*x8)/x2*x2*x6*x7,求1.206466667
题目详情
excel 宏程序 X1=31,X2=65 X3=30~43之间的整数,X4=88~124之间的整数 X5=14~18之间的整数,或等于27,X6,X7=10,或14~18之间的整数,X8=34~38之间的整数,或等于40,k=(x1*x3*x5*x8)/x2*x2*x6*x7,求 1.206466667
▼优质解答
答案和解析
Sub kkk()
X1 = 31
X2 = 65
Dim X3 As Variant
X3 = Array(30,31,32,33,34,35,36,37,38,39,40,41,42,43)
Dim X4(37) As Variant
For i = 0 To 36
X4(i) = i + 88
Next i
Dim X5 As Variant
X5 = Array(14,15,16,17,18,27)
X6 = 10
X7 = 10
Dim X8 As Variant
X8 = Array(34,35,36,37,38,40)
rn = 2
Sheets(1).Cells(1,1) = "X3"
Sheets(1).Cells(1,2) = "X4"
Sheets(1).Cells(1,3) = "X5"
Sheets(1).Cells(1,4) = "X8"
For i = 0 To 13
For j = 0 To 36
For m = 0 To 5
For n = 0 To 5
k = (X1 * X3(i) * X5(m) * X8(n)) / X2 / X2 / X6 / X7
If 1.206466667 < k < 1.206866667 Then
Sheets(1).Cells(rn,1) = X3(i)
Sheets(1).Cells(rn,2) = X4(j)
Sheets(1).Cells(rn,3) = X5(m)
Sheets(1).Cells(rn,4) = X8(n)
rn = rn + 1
End If
Next n
Next m
Next j
Next i
End Sub
结果都输出到sheet1里
我感觉这个计算的式子 k = (X1 * X3(i) * X5(m) * X8(n)) / X2 / X2 / X6 / X7有点问题,运行了一下,有几千上万的组合.
X1 = 31
X2 = 65
Dim X3 As Variant
X3 = Array(30,31,32,33,34,35,36,37,38,39,40,41,42,43)
Dim X4(37) As Variant
For i = 0 To 36
X4(i) = i + 88
Next i
Dim X5 As Variant
X5 = Array(14,15,16,17,18,27)
X6 = 10
X7 = 10
Dim X8 As Variant
X8 = Array(34,35,36,37,38,40)
rn = 2
Sheets(1).Cells(1,1) = "X3"
Sheets(1).Cells(1,2) = "X4"
Sheets(1).Cells(1,3) = "X5"
Sheets(1).Cells(1,4) = "X8"
For i = 0 To 13
For j = 0 To 36
For m = 0 To 5
For n = 0 To 5
k = (X1 * X3(i) * X5(m) * X8(n)) / X2 / X2 / X6 / X7
If 1.206466667 < k < 1.206866667 Then
Sheets(1).Cells(rn,1) = X3(i)
Sheets(1).Cells(rn,2) = X4(j)
Sheets(1).Cells(rn,3) = X5(m)
Sheets(1).Cells(rn,4) = X8(n)
rn = rn + 1
End If
Next n
Next m
Next j
Next i
End Sub
结果都输出到sheet1里
我感觉这个计算的式子 k = (X1 * X3(i) * X5(m) * X8(n)) / X2 / X2 / X6 / X7有点问题,运行了一下,有几千上万的组合.
看了excel宏程序X1=31,X...的网友还看了以下:
下列是某蛋白质的结构片段:(4)e述蛋白质的结构片段的水解产物了不属于α-氨基酸的结构简式是.(2 2020-04-06 …
提示:D-C=0A-B,A-D,D-C,D-E,E-F=1A-D,C-F=2A-B,D-E,E-F 2020-04-06 …
已知点P在曲线y=4/(e^x+10)上,a为曲线在点P处的切线的倾斜角,则a的取值范围是()A[ 2020-04-11 …
we的e在英音里发/i/还是/:e/的音?me的e在英音里发/i/还是/:e/的音?he的e在英音 2020-05-13 …
有一块边长为4的正方形塑料模板ABCD,将一块足够大的直角三角板的直角顶点落在正方形ABCD对角线 2020-05-16 …
知:在平行四边形ABCD中,CD=10,sin角C=4/5,点E、F分别是边AD、对角线BD上的动 2020-05-16 …
English的E在什么情况下可以小写?不是光说带e的单词是说English这个单词在什么情况下e 2020-05-16 …
已知e=2.71828···,问下列x的近似值a有几位有效数字.(1)x=e,a=2.7;(4)x 2020-05-20 …
1.观察下面几个关于平方和的有趣等式:1的平方+4的平方+6的平方+7的平方=2的平方+3的平方+ 2020-06-04 …
若X为一随机变量,且数学期望E(X)和方差D(X)分别为1和4,则E(E(X))和D(D(X))为 2020-06-10 …