Sabtu, 26 Oktober 2013

Contoh Coding Trend Pasar



Private Sub Command1_Click()
a = Val(Text1.Text)
f = a + 52
If f <= 46 Then
For g = f To 46 Step 52
b = g + 52
Next g
Else
    If f >= 99 Then
    For g = f To 99 Step 52
    b = g - 52
    Next g
    Else
        b = f
    End If
End If
If b >= 47 And b <= 59 Then
c = b - 41
d = 75
For e = 6 To c
d = d + e
Next e
Else
    If b >= 73 And b <= 85 Then
    c = b - 67
    d = 75
    For e = 6 To c
    d = d + e
    Next e
    Else
        If b >= 60 And b <= 72 Then
        c = b - 54
        d = 231
        For e = 6 To c
        d = d - e
        Next e
        Else
            c = b - 80
            d = 231
            For e = 6 To c
            d = d - e
            Next e
        End If
    End If
End If

Label1.Caption = d
Text1.Text = ""
Text1.SetFocus
End Sub



Tidak ada komentar: