Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Public Function DISKON(totalBelanja As Long, Optional persen As Currency = True) As Currency
- If persen Then
- If totalBelanja < 100000 Then
- DISKON = 0
- ElseIf totalBelanja <= 150000 Then
- DISKON = 0.05
- ElseIf totalBelanja <= 200000 Then
- DISKON = 0.1
- Else
- DISKON = 0.15
- End If
- Else
- If totalBelanja < 100000 Then
- DISKON = 0
- ElseIf totalBelanja <= 150000 Then
- DISKON = 0.05 * totalBelanja
- ElseIf totalBelanja <= 200000 Then
- DISKON = 0.1 * totalBelanja
- Else
- DISKON = 0.15 * totalBelanja
- End If
- End If
- End Function
- Public Function LULUS(nilai As Currency) As String
- If nilai >= 80 Then
- LULUS = "Lulus"
- Else
- LULUS = "Tidak Lulus"
- End If
- End Function
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement