計概第二發

看板geography101作者 (just me)時間15年前 (2008/12/11 15:53), 編輯推噓0(002)
留言2則, 2人參與, 最新討論串1/1
Public Class Form1 Dim Array() As Integer = {9, 45, 6, 7, 15, 25, 6, 64, 10, 99} Dim i As Integer Dim min As Integer Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click min = Array(0) For i = 0 To 9 If Array(i) < min Then min = Array(i) Next i TextBox1.Text = "最小值為" & min End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click TextBox1.Text = "" End Sub Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load End Sub End Class ======================================================================= 這個只有出現最小值 沒有排整個數列 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.112.63.19

12/11 20:48, , 1F
你遜掉啦
12/11 20:48, 1F

12/11 21:05, , 2F
沒辦法阿 夏豪廷太罩了 我都用偷懶的方法
12/11 21:05, 2F
文章代碼(AID): #19GCS8eP (geography101)