bài tập CLC Nhập 5 số nguyên dương - Pdf 70

Nhập 5 số nguyên dương. Tính các đại lượng như trên form
Dim a(5) As Integer
Dim dem As Integer
Dim i As Integer
Dim us As Integer
Dim bs As Integer
Dim maxgt As Double
Dim min As Integer
Dim max As Integer
Private Function nto(x As Integer) As Boolean
dem = 0
For i = 1 To x
If x Mod i = 0 Then dem = dem + 1
Next i
If dem = 2 Then
nto = True
Else
nto = False
End If
End Function
Private Sub Command2_Click()
txtA.Text = ""
For i = 0 To 4
txtA.Text = txtA.Text & Str(a(i)) & " "
Next i
End Sub
Private Sub Command3_Click()
Dim i As Integer
Dim n
n = 5
txtchia2.Text = ""

txtbs.Text = Str(bs)
End Sub


Nhờ tải bản gốc

Tài liệu, ebook tham khảo khác

Music ♫

Copyright: Tài liệu đại học © DMCA.com Protection Status