求大神帮忙做一下这个大学VB程序设计的实验报告!
因为课选得比较多比较杂,没时间做这个报告,请有会的大神帮帮忙!先谢谢了!实验报告模版我给放到360云盘上了,用户名和密码都是13007541070。...
因为课选得比较多比较杂,没时间做这个报告,请有会的大神帮帮忙!先谢谢了!
实验报告模版我给放到360云盘上了,用户名和密码都是13007541070 。 展开
实验报告模版我给放到360云盘上了,用户名和密码都是13007541070 。 展开
展开全部
Private Sub Command1_Click()
Dim a As Integer, b As String, i As Integer, c() As String
a = Len(Text1.Text)
Print a
ReDim c(a) As String
For i = 1 To a
b = Mid(Text1.Text, i, 1)
Select Case b
Case "a" To "z"
c(i) = UCase(b)
Case "A" To "Z"
c(i) = LCase(b)
Case Else
c(i) = Chr(32)
End Select
Next i
Text1.Text = ""
For i = 1 To a
Text1.Text = Text1.Text & c(i)
Next i
End Sub
2、
Private Sub Form_click()
Dim a(5) As Double, i As Integer, j As Integer, k As Integer, sum As Double
Dim flag As Boolean, how As Boolean
For i = 1 To 5
a(i) = Val(InputBox("please input", "input number"))
sum = sum + a(i)
Next i
If sum > 450 Then
flag = True
how = True
End If
For k = 1 To 5
If a(k) > 88 Then
flag = True
how = True
End If
Next k
For j = 1 To 3
If a(j) > 95 Then flag = True
Next j
For k = 4 To 5
If a(k) > 80 Then how = True
Next k
If flag = True And how = True Then
Print "excellent"
End If
End Sub
3、Private Sub Form_click()
Dim s As Single, price As Single, total As Single
s = Text1.Text
If s < 100 Then
price = 32
ElseIf 100 <= s < 200 Then
price = 28
ElseIf 200 <= s < 300 Then
price = 25
ElseIf 300 <= s < 400 Then
price = 22.5
ElseIf 400 <= s < 1000 Then
price = 20
ElseIf s > 1000 Then
price = 15
End If
total = price * s
Print total
End Sub
给分吧
DFRobot
2024-11-10 广告
2024-11-10 广告
图形化编程是一种直观的编程方式,它通过拖拽图形化的编程积木来构建程序,降低了编程的学习门槛。在上海智位机器人股份有限公司,我们致力于将图形化编程应用于机器人教育等领域,使学习者能够以更加轻松、有趣的方式掌握编程技能。我们的图形化编程平台界面...
点击进入详情页
本回答由DFRobot提供
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询