vb程序设计题目及答案 vb程序设计经典例题
main(){ int x,y,z,t; printf("type three num:"); scanf("%d %d %d",&x,&y,&z); if(x<y){t=x;x=y;y=t;} if(y<z){t=y;y=z;z=t;} if(x<y){t=x;x=y;y=t;} printf("%d %d %d",x,y,z); system("pause"); }
VB程序设计题左面是保存的数据文件 出题:自动,手动均可
vb程序设计答案(1) Dim n(4) As Integer For i = 1 To 9 For j = 1 To 9 If i <> j Then a = 10 * i + j For k = 1 To 9 For l = 1 To 9 For m = 1 To 9 If k <> l And k <> m And l <> m .
关于vb程序设计题Dim i,a,b,s as integer For i=1 to 99 b=1 For a=1 to i b=b*a Next a s=s+b Next b messagebox.show(s)
VB编程题.输入的办法太多了 你自己研究吧 输出就下面这个 for i=1 to 10 print a(11-i) next i
vb程序设计例题修改好了测试成功,但是,基本上,偶数和会大于所有的数 Private Sub Command1_Click() Dim a(10) As Double Dim t As Double Randomize For i = 1 To 10 a(i) = Int(Rnd * 100 + 2) '设十个数,给十个数随机赋值 If a(i) Mod 2 = 0 Then t = t + a(i): Print "偶数为"; a(i) Next i Print "偶数的和为"; t For i = 1 To 10 If a(i) < t Then Print "小于偶数和的数"; a(i) Next i End Sub
VB算法设计题将数学工式(高中的数列)写成VB 就OK了 Private Sub Form_Click()Dim sum As DoubleDim a1 as Long '开始计算最小数Dim an as Long '最后要加的数sum=n*(a1+an)/2 .
VB题目(二)Private Sub Command1_Click() Dim h, m As Integer Do h = Val(InputBox("请输入上网时间(小时),输入 0 则结束", 0)) If h <= 0 Then Exit Do If h < 10 Then m = 30 ElseIf h >= 10 And h < 50 Then m = 5 * h ElseIf h >= 50 Then m = 2.5 * h End If Print "上网时间:" & Format(h) & "小时,费用:" & Format(m) & " 元" Loop End Sub
vb程序设计基础设计练习题2答案在窗口中拖出3个控件,文本框textbox1,按钮button1,button2.编辑button1单击事件,textbox1.visibled = false编辑button2单击事件,textbox1.visibled = true
VB程序设计(第三版)的习题五,求第5题答案!!!Private Sub Command1_Click()Dim a(1 To 4, 1 To 4) As Integer, b(1 To 4, 1 To 4) As Integer, c(1 To 4, 1 To 4) As IntegerFor i = 1 To 4 For j = 1 To 4 a(i, j) = Int(Rnd * 41 + 30.