b求π为啥是错的Private Sub Command1_Click()Dim s As Integer,n As Double,u As Double,pi As Double,pii As DoubleWhile Abs(u) >= 0.001pi = pi + un = n + 2s = -su = s / npii = 4 * piWendPrint piiEnd Sub
来源:学生作业帮助网 编辑:作业帮 时间:2024/11/28 20:54:39
xݑAKQǿVh.Hx7Z⺝ML*+ lB_bߺ~fߪHN]ͼ'hlw
ykғ;;Yu+S fɤ FRڦUӠCXES֕,G\rJ1?̘o)²3
X.i0*bNG1uMD)+$$9Io,?e~bLc1HGyL H?dVp& k+M?z-z[ݼm}}D.8[<[LӣeFZ:
1/Y5Ly$2`^AK{DwA{( /U
b求π为啥是错的Private Sub Command1_Click()Dim s As Integer,n As Double,u As Double,pi As Double,pii As DoubleWhile Abs(u) >= 0.001pi = pi + un = n + 2s = -su = s / npii = 4 * piWendPrint piiEnd Sub
b求π为啥是错的
Private Sub Command1_Click()
Dim s As Integer,n As Double,u As Double,pi As Double,pii As Double
While Abs(u) >= 0.001
pi = pi + u
n = n + 2
s = -s
u = s / n
pii = 4 * pi
Wend
Print pii
End Sub
b求π为啥是错的Private Sub Command1_Click()Dim s As Integer,n As Double,u As Double,pi As Double,pii As DoubleWhile Abs(u) >= 0.001pi = pi + un = n + 2s = -su = s / npii = 4 * piWendPrint piiEnd Sub
你要循环多少次呢?如果S开始是正的话,你循环一次不是变了负了吗?那U=S/N也变负了,那
Abs(u)>=0.001就不符合,跳出循环了
b求π为啥是错的Private Sub Command1_Click()Dim s As Integer,n As Double,u As Double,pi As Double,pii As DoubleWhile Abs(u) >= 0.001pi = pi + un = n + 2s = -su = s / npii = 4 * piWendPrint piiEnd Sub
Private Sub 与 Sub的区别
Private Sub Command1_Click() Dim b,k For k=1 to 6 b=23+k Next k MsgBox b+k End Sub 是关于计算机二级access的问题、、、Private Sub Command1_Click()Dim b,kFor k=1 to 6b=23+kNext kMsgBox b+kEnd Sub
用VB求 设a=5,b=2.5,c=7.8,编程序计算:y=a*b*π/a+b*c 用开头这样的 Private Sub Command1_Click()
VB里的sub单词是什么意思,比如private sub……、end sub
求3到200之间所有非偶数且非素数的数之和,不知道哪里编错了Private Sub Command1_Click() s = 0 For a = 3 To 200 Step 2 For b = 2 To a - 1 If a Mod b = 0 Then s = s + aNext bNext aPrint send sub
VB里的“Private Sub Command1_Click()”是什么意思?那个横,
Private Sub Form_Load() 的意思具体是什么啊,sub的意思是什么啊?
求三位数中,个位数字与十位数字之和除以10所得的余数是百位数字,且百位数字是偶数的数的个数.Private Sub Form_click()Dim s As IntegerDim x As IntegerDim a As IntegerDim b As IntegerDim c As Integers = 0x = 100Do Whi
Vb求N的阶层我自己做的,Private Sub Form_Click()Dim a As Single,b As Integer,c As Integer,d As Singlea = 1b = 1c = 0d = 0Do While Abs(b / a) > 0.000001d = d + b / ac = c + 1a = a * cb = -bLoopPrint dEnd Sub
vb中的private public 我看了一些vb的教程,在学sub的时候,里面说private sub表示sub过程是私有的,只能被本模块中的其它过程实用,public sub则任何地方都能用,主要不知道什么是本模块,最好举例,这样
VB 请大家分析一下我写的代码 哪里错误static a,b,c as integera=3:b=4:c=5private sub command1 _click()msgbox a*2+bend sub为什么答案上写的是用 dim myval 而且使用的是 const myvla Debug.Print
MsgBox a$,34,b$,c$,5如何运算Private Sub Form_Click()a$ = MicrosoftVisual Basicb$ = Right(a$,5)c$ = Mid(a$,1,9)MsgBox a$,34,b$,c$,5End Sub最后这一步是怎么运算的?
VB 求1000以内素数的和 这个哪里错了 不能用for语句Private Sub Command1_Click() n = 0 '0-1000的一个数 s = 0 '素数和 i = 1 '求余变量 Do While n
(23)已知有下面的过程 Private Sub proc1(a As Integer,b As String,Optional x As Boolean)……End Sub正确调用此过程的语句是A)Call procl(5) B)Call proc1 5,”abc”,FalseC)proc1(12,”abc”,True) D)proc1 5,“abc”没一个答案是
勾股定理中三个数的关系是a*a+b*b=c*c.编写程序,输出30以内满足上述关系的整数组合.例如3,4,5就是一个满足要求的整数组合Private Sub Command_Click()End Sub
下面程序循环后,为什么会是那样的结果?请详细说明其执行过程,Private Sub Form_Click()For a = 1 To 3For b = 1 To 3For c = 1 To 3Print a,b,cNext cNext bNext aEnd Sub
VB题目:输入三角形的三边编程求出面积下面是我自己编的,可是好像是错的,大虾帮忙看看(我用了余弦定理)Private Sub Command1_Click()Dim x As Doublea = InputBox(请输入三角形第一边)b = InputBox(请输入