<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
KuliahInformatika
Jumat, 20 Oktober 2017
Kamis, 19 Oktober 2017
Jumat, 13 Oktober 2017
Senin, 02 Oktober 2017
Menghitung IP dan IPK
Berikut contoh logika untuk menghitung IP di semester 1
Private Sub Command2_Click()
Dim ipsemester1 As Double
Dim semester1 As Integer
Dim pilihan1 As Integer
Dim nilai1 As Integer
Dim nilai2 As Integer
Dim nilai3 As Integer
nilai1 = Val(Text1.Text)
nilai2 = Val(Text2.Text)
nilai3 = Val(Text3.Text)
ipsemester1 = 0
pilihan1 = 0
semester1 = 0
If Option1.Value = True Then
semester1 = semester1 + nilai1
pilihan1 = pilihan1 + 1
End If
If Option4.Value = True Then
semester1 = semester1 + nilai2
pilihan1 = pilihan1 + 1
End If
If Option7.Value = True Then
semester1 = semester1 + nilai3
pilihan1 = pilihan1 + 1
End If
ipsemester1 = semester1 / pilihan1
Text4.Text = Format(ipsemester1, "#, ##0.0#")
End Sub
Private Sub Command2_Click()
Dim ipsemester1 As Double
Dim semester1 As Integer
Dim pilihan1 As Integer
Dim nilai1 As Integer
Dim nilai2 As Integer
Dim nilai3 As Integer
nilai1 = Val(Text1.Text)
nilai2 = Val(Text2.Text)
nilai3 = Val(Text3.Text)
ipsemester1 = 0
pilihan1 = 0
semester1 = 0
If Option1.Value = True Then
semester1 = semester1 + nilai1
pilihan1 = pilihan1 + 1
End If
If Option4.Value = True Then
semester1 = semester1 + nilai2
pilihan1 = pilihan1 + 1
End If
If Option7.Value = True Then
semester1 = semester1 + nilai3
pilihan1 = pilihan1 + 1
End If
ipsemester1 = semester1 / pilihan1
Text4.Text = Format(ipsemester1, "#, ##0.0#")
End Sub
Sabtu, 30 September 2017
Materi Looping
Buat Form
Logika
Dim i As Integer
'For (+)
Private Sub Command1_Click()
List1.Clear
For i = 1 To 5
List1.AddItem i
Next i
End Sub
'For(-)
Private Sub Command2_Click()
List2.Clear
For i = 5 To 1 Step -1
List2.AddItem i
Next i
End Sub
'Do While (+)
Private Sub Command3_Click()
i = 1
Do While i <= 5
List3.AddItem i
i = i + 1
Loop
End Sub
'Do Until (+)
Private Sub Command4_Click()
i = 1
Do Until i > 5
List5.AddItem i
i = i + 1
Loop
End Sub
'Do While (-)
Private Sub Command5_Click()
i = 5
Do While i >= 1
List4.AddItem i
i = i - 1
Loop
End Sub
'Do Until (-)
Private Sub Command6_Click()
i = 5
Do Until i <= 0
List6.AddItem i
i = i - 1
Loop
End Sub
Hasil
Logika
Dim i As Integer
'For (+)
Private Sub Command1_Click()
List1.Clear
For i = 1 To 5
List1.AddItem i
Next i
End Sub
'For(-)
Private Sub Command2_Click()
List2.Clear
For i = 5 To 1 Step -1
List2.AddItem i
Next i
End Sub
'Do While (+)
Private Sub Command3_Click()
i = 1
Do While i <= 5
List3.AddItem i
i = i + 1
Loop
End Sub
'Do Until (+)
Private Sub Command4_Click()
i = 1
Do Until i > 5
List5.AddItem i
i = i + 1
Loop
End Sub
'Do While (-)
Private Sub Command5_Click()
i = 5
Do While i >= 1
List4.AddItem i
i = i - 1
Loop
End Sub
'Do Until (-)
Private Sub Command6_Click()
i = 5
Do Until i <= 0
List6.AddItem i
i = i - 1
Loop
End Sub
Hasil
Kamis, 21 September 2017
Kamis, 14 September 2017
Pertemuan 2
Langganan:
Postingan (Atom)