basic 实现 1,2,3,5,6,A,7转换为1-3,5,6,A,7
来源:学生作业帮 编辑:神马作文网作业帮 分类:综合作业 时间:2024/11/10 22:51:57
basic 实现 1,2,3,5,6,A,7转换为1-3,5,6,A,7
Private Sub Command1_Click()
On Error GoTo j
a = "1,2,3,5,6,A,7,8,9,10"
t = Split(a, ",")
For i = 0 To UBound(t)
If Val(t(i)) = Val(t(i + 1)) - 1 Then
n = n + 1
If lian = False Then m = t(i) & "&" & i & "&" & "true"
lian = True
Else
lian = False
If InStr(1, m, "true") = 0 Then m = t(i) & "&" & i & "&" & "false"
End If
If lian = False Then
h = Split(m, "&")
Print h(0) & "-" & t(Val(h(1)) + n)
m = ""
n = 0
End If
Next
j:
h = Split(m, "&")
Print h(0) & "-" & t(Val(h(1)) + n)
End Su
On Error GoTo j
a = "1,2,3,5,6,A,7,8,9,10"
t = Split(a, ",")
For i = 0 To UBound(t)
If Val(t(i)) = Val(t(i + 1)) - 1 Then
n = n + 1
If lian = False Then m = t(i) & "&" & i & "&" & "true"
lian = True
Else
lian = False
If InStr(1, m, "true") = 0 Then m = t(i) & "&" & i & "&" & "false"
End If
If lian = False Then
h = Split(m, "&")
Print h(0) & "-" & t(Val(h(1)) + n)
m = ""
n = 0
End If
Next
j:
h = Split(m, "&")
Print h(0) & "-" & t(Val(h(1)) + n)
End Su
C语言如何实现下面数组的转换 1 2 3 4 1 11 14 16 5 6 7 8转换为 5 2 12 15 9 10
一、用JAVA编写程序实现矩阵乘积;int a[][]={{1,2,3},{4,5,6},{7,8,
Visual Basic 表达式5\2-2^3*4/8 mod 3的值是( ) A)0 B)1 C)1.5 D)-1
在EXCEL表中,如何实现¥123,456.78 到¥ 1 2 3 4 5 6 7 8 的转换,请大师指教!
在Visual Basic中,若a=1,b=2,c=5,则下列逻辑表达式值为真的是
Visual Basic里公式 Dim a =New integer(,){{1,1},{2,2},{3,3},{4,
在Visual Basic中,执行“A=6:A=A+6”,变量A的值为
31、下列程序段中可实现1×2×3×4×5×6×7×8×9×10的是( ).A、int k=1,m=0; for(;k
下列表达式中,符合 Visual Basic表达式书写规范的是 (A)3+|k-1| (B)2k-1 (C)a·k/2
BASIC题目:求下列程序的运行结果 1.10 A=5 20 GOTO 40 30 A=A+1 40 PRINT A 5
下列Visual Basic程序段运行后,变量s的值为__. a=2:b=1:s=0 For i=10 To 6 Ste
10,在Visual Basic中,下列( )程序行是对的 A,x-5=y=5 B,A+B=C^3 C,Y=1:Y=Y+