close
標題:
VB.Net 的程式設計問題
發問:
有一組數字 {123,767,903,872,454,305,12} , 計算0到9數字的個數 請問這程式碼要怎麼寫 ? PS: 需用 Visual Basic . Net 抱歉喔,我不是相關科系的,不知道有簡單一點的嗎?我看第一行是 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As_ System.EventArgs) Handles Button1.Click 之前的問題被刪除了,程式碼還沒記起來 更新: 不是我惡意移除,是時間到了,我忘了選出最佳解答,就被移除了,能麻煩你再告訴我一下程式碼嗎,抱歉~~
問題被刪除?? 不是你惡意移除嗎? 給點事小, 惡意移除事大。 2006-05-01 21:29:09 補充: Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click Dim a(10) As Integer Dim i As Integer Dim s As String s = "{123,767,903,872,454,305,12}" For i = 1 To Len(s) Select Case Mid(s, i, 1) Case "0", "1", "2", "3", "4", "5", "6", "7", "8", "9" a(Val(Mid(s, i, 1) + 1)) += 1 End Select Next MsgBox(s & "含有" & Chr(13) & " 0: " & a(1) & " 個" _ & Chr(13) & " 1: " & a(2) & " 個" _ & Chr(13) & " 2: " & a(3) & " 個" _ & Chr(13) & " 3: " & a(4) & " 個" _ & Chr(13) & " 4: " & a(5) & " 個" _ & Chr(13) & " 5: " & a(6) & " 個" _ & Chr(13) & " 6: " & a(7) & " 個" _ & Chr(13) & " 7: " & a(8) & " 個" _ & Chr(13) & " 8: " & a(9) & " 個" _ & Chr(13) & " 9: " & a(10) & " 個" _ , , "訊息視窗") End Sub
其他解答:5FAD1C75CFAE8A5F
VB.Net 的程式設計問題
發問:
有一組數字 {123,767,903,872,454,305,12} , 計算0到9數字的個數 請問這程式碼要怎麼寫 ? PS: 需用 Visual Basic . Net 抱歉喔,我不是相關科系的,不知道有簡單一點的嗎?我看第一行是 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As_ System.EventArgs) Handles Button1.Click 之前的問題被刪除了,程式碼還沒記起來 更新: 不是我惡意移除,是時間到了,我忘了選出最佳解答,就被移除了,能麻煩你再告訴我一下程式碼嗎,抱歉~~
- 99各科大入學成績
- ADSL跟信和網路哪個好--
- 嘉義吃到飽餐廳
- 103統測470分落在哪
- 哪種是最快方式到台南大內新訓中心?
- 今年基測分數369可以分發到哪一所高中-(竹苗區)
- 台中市平板維修站哪裡有-
- wacom 的兩個繪圖板猶豫~ 請達人們幫忙
- 478 p4.3.06g及939 A64 3000+
- 學校二技分發分數-
此文章來自奇摩知識+如有不便請留言告知
最佳解答:問題被刪除?? 不是你惡意移除嗎? 給點事小, 惡意移除事大。 2006-05-01 21:29:09 補充: Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click Dim a(10) As Integer Dim i As Integer Dim s As String s = "{123,767,903,872,454,305,12}" For i = 1 To Len(s) Select Case Mid(s, i, 1) Case "0", "1", "2", "3", "4", "5", "6", "7", "8", "9" a(Val(Mid(s, i, 1) + 1)) += 1 End Select Next MsgBox(s & "含有" & Chr(13) & " 0: " & a(1) & " 個" _ & Chr(13) & " 1: " & a(2) & " 個" _ & Chr(13) & " 2: " & a(3) & " 個" _ & Chr(13) & " 3: " & a(4) & " 個" _ & Chr(13) & " 4: " & a(5) & " 個" _ & Chr(13) & " 5: " & a(6) & " 個" _ & Chr(13) & " 6: " & a(7) & " 個" _ & Chr(13) & " 7: " & a(8) & " 個" _ & Chr(13) & " 8: " & a(9) & " 個" _ & Chr(13) & " 9: " & a(10) & " 個" _ , , "訊息視窗") End Sub
其他解答:5FAD1C75CFAE8A5F
文章標籤
全站熱搜
留言列表