0% found this document useful (0 votes)
14 views3 pages

Private Sub Command1 - Click Private Sub Command7 - Click

The document declares arrays a, b, and c with 4 rows and 4 columns of single data type. It declares variables baris, kolom, kal and performs operations like adding values to arrays a and b based on user input for baris and kolom. It loops through arrays a and b to add values and display the sum in list boxes. It also finds the maximum value in an array nilai and displays it.

Uploaded by

Roi Milyardi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views3 pages

Private Sub Command1 - Click Private Sub Command7 - Click

The document declares arrays a, b, and c with 4 rows and 4 columns of single data type. It declares variables baris, kolom, kal and performs operations like adding values to arrays a and b based on user input for baris and kolom. It loops through arrays a and b to add values and display the sum in list boxes. It also finds the maximum value in an array nilai and displays it.

Uploaded by

Roi Milyardi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Dim a(4, 4) As Single

Next j

Dim b(4, 4) As Single

List2.AddItem kal

Dim c(4, 4) As Single

Next i

Private Sub Command1_Click()

End Sub

baris = Val(Text1)

Private Sub Command7_Click()

kolom = Val(Text2)

c(i, j) = a(i, j) + b(i, j)

a(baris, kolom) = Val(Text3)

For i = 1 To 4

End Sub

kal = ""

Private Sub Command2_Click()

For j = 1 To 4

List1.Clear

kal = kal & a(i, j) + b(i, j) & ""

For i = 1 To 4

Next j

kal = ""

List3.AddItem kal

For j = 1 To 4

Next i

kal = kal & a(i, j) & " "

End Sub

Next j
List1.AddItem kal
Next i
End Sub
Private Sub Command3_Click()
baris = Val(Text4)
kolom = Val(Text5)
b(baris, kolom) = Val(Text6)
End Sub
Private Sub Command4_Click()
List2.Clear
For i = 1 To 4
kal = ""
For j = 1 To 4
kal = kal & b(i, j) & " "

Dim nilai(100) As Single


Dim n As Integer
Private Sub Command1_Click()
n=n+1

nama(n) = Trim(Text1)
nilai(n) = Val(Text2)
List1.AddItem nama(n) & " : nilai = " &
nilai(n)
End Sub
Private Sub Command2_Click()
nilaiMaks = nilai(1)
For i = 2 To n
If nilai(i) > nilaiMaks Then nilaiMaks =
nilai(i)
Next
List1.AddItem ""
List1.AddItem "Nilai Terbaik Oleh yang
nilainya : " & nilaiMaks
End Sub
Private Sub Command4_Click()
End
End Sub

Private Sub Command1_Click()


n = Val(Text1)

Private Sub Form_Load()


n=0
List1.Clear
End Sub

List1.Clear
For i = 1 To n
bil = (0.5 * i ^ 2) - (0.5 * i) + 1
List1.AddItem bil
Next i

End Sub

Private Sub Command2_Click()


Text1.Text = ""
List1.Clear

End Sub

Private Sub Command3_Click()


End
End Sub

You might also like