计算机区间的值VB表达式,在VB中表示“x属于区间[a,b)”的正确表达式是( )。...

(2)

请在划线处填入合适的代码。

Function getmin(a As Integer,

b As Integer) ’获取两个整数的较小者

If a < b Then getmin = a Else getmin = b

End Function

Private Sub Command1_Click()

Dim s1 As String, s2 As

String, i As Integer, j As Integer, x As Integer, y As Integer

Dim cnt As Integer, ans

As Integer, len1 As Integer, len2 As Integer

s1=Text1.Text

s2=Text2.Text

len1=Len(s1)

len2=Len(s2)

minlen =________     ‘minlen中保存s1和s2中较短字符串的长度

ans = 0

For i = 1 To len1

For j = 1 To len2

cnt = 0: x = i: y = j

Do While________And

cnt < minlen

cnt = cnt

+ 1

x = x Mod

len1 + 1

y = y Mod

len2 + 1

Loop

If________Then

ans = cnt

Next j

Next i

Label3. Caption = Str(ans)

End Sub

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值