Advertisement
imjyb1008

1613122602156_01

Dec 26th, 2013
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Private Sub Command1_Click()
  2.  
  3.     Cls
  4.    
  5.     Dim n As Integer
  6.     n = Val(InputBox("請輸入多少個數值"))
  7.    
  8.     Dim min As Integer
  9.     min = Val(InputBox("請輸入數值"))
  10.    
  11.     Dim i As Integer
  12.     For i = 2 To n
  13.    
  14.         num = Val(InputBox("請輸入數值"))
  15.        
  16.         If n < min Then
  17.        
  18.             min = num
  19.            
  20.         End If
  21.        
  22.     Next i
  23.    
  24.     Print min
  25.  
  26. End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement