ldcf.net
当前位置:首页 >> VB编成题 求答案 急急急 >>

VB编成题 求答案 急急急

x=inputbox("x=") if x=int(x) then print x;"是整数" else print x;"不是整数"

Private Sub Form_Click() Dim j As Integer, sum As Double For j = 2 To 12 Step 2 sum = sum + j / JC(j - 1) Next j MsgBox sum End Sub JC那个函数没句字数填出来

第一题选 B 第二题选 D 这些题目是哪里的,感觉写得不够严谨

水手分椰子问题 5个水手在椰岛上发现拉一堆椰子:先由第一名水手把椰子分成等量的5堆,还剩下一个 给猴子,自己藏一堆,然后,第二个水手把剩下4堆混合后重新分成等量的5堆。还剩下一个 个猴子,自己藏起一堆,以后第3,4个水手依此办理,最后第...

Dim t1 As Integer, t2 As Integer, sf As Integer, da As IntegerSub chuti()Randomizet1 = Int(Rnd * 90) + 10t2 = Int(Rnd * (t1 - 9)) + 10sf = Int(Rnd * 4)Select Case sfCase 0 Label1.Caption = t1 & " + " & t2 & " = " da = t1 + t2Ca...

Private Sub Form_dblClick() Dim sum As Long sum = 1For i = 1 To 100 sum = sum + 5 * i Next YZJ (sum)End SubPrivate Sub YZJ(i As Integer) Dim OUT As Integer OUT = FreeFile Open App.Path & "\27.out" For Output As #OUT Print #OUT,...

求和代码,假定数组为a(): dim i as integer , s as long for i=1 to 100 step 2 s=s+a(i) next i print s 存盘代码,假定存在D盘上: open "D:\out3.txt" for append as #1 print #1,s close #1

Private Sub Command1_Click() List1.Clear Me.Caption = "在100以内的素数中找出间隔最大的一对相邻素数" Dim Flag As Boolean, MaximumInterval As Integer, Subscript As Integer For i = 2 To 100 Flag = True For j = 2 To Sqr(i) If i Mod...

用2个时钟控件,和2个滚动条就可以啦!

Private Sub MDIForm_Load() Form1.Show Form2.Show Form3.Show End Sub Private Sub Toolbar1_ButtonClick(ByVal Button As MSComctlLib.Button) Select Case Button Case Toolbar1.Buttons(1) '水平排列 Me.Arrange 1 Case Toolbar1.Buttons(2...

网站首页 | 网站地图
All rights reserved Powered by www.ldcf.net
copyright ©right 2010-2021。
内容来自网络,如有侵犯请联系客服。zhit325@qq.com