看板 geography101 關於我們 聯絡資訊
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
hansenay:你遜掉啦 12/11 20:48
sarcasm:沒辦法阿 夏豪廷太罩了 我都用偷懶的方法 12/11 21:05