b) Free calls 150
c) 151 to 400 calls - 0.80 Rs.
d) 401 to 1000 calls - 1 Rs.
e) 1001 onwards - 1.20Rs.
Rural
a) Rental 180
b) Free calls 250
c) 251 to 450 calls - 0.60 Rs.
d) 451 to 500 calls - 0.80RS.
e) 501 to 1000 - lRs.
f) 1001 onwards - 1.20 Rs.
Ans :
Dim Ncall As Integer Private Sub Form Load ()
optRural.Enabled = False
optUrban.Enabled = False
End Sub
Private Sub optRural_Click()
Ncall = CInt(txtCalls.Text)
If Ncall <= 180 Then s = 180 Elself Ncall >= 251 And Ncall <= 450 Then s = Ncall * 0.6 * 180 Elself Ncall >= 451 And Ncall <= 500 Then s = Ncall * 0.8 * 180 Elself Ncall > 501 And Ncall <= 1000 Then s = Ncall * 1 * 180 Elself Ncall > 1000 Then s = Ncall * 1.2 * 180
End If
txtFcall.Text = 250 txtTamt.Text = s
End Sub
Private Sub optUrban_Click()
Ncall = 0
If Ncall <=150 Then s = 250 Elself Ncall >= 151 And Ncall <= 400 Then s = Ncall * 0.8 * 250 Elself Ncall >= 401 And Ncall <= 1000 Then s = Ncall * 1 * 250 Elself Ncall > 1000 Then S = Ncall * 1.2 * 250
End If
txtFcall.Text = 150 txtTamt. Text = s
End Sub
Private Sub txtCalls_LostFocus() optRural. Enabled = True
optUrban.Enabled = True
End Sub
No comments:
Post a Comment