- Home
·
- Math/Dates
·
- This program Calculates the Electric Bill by Entering the Current meter reading and previous readin
This program Calculates the Electric Bill by Entering the Current meter reading and previous readin
This program Calculates the Electric Bill by Entering the Current meter reading and previous reading and phase no(1,3).
API Declarations
Dim pr As Integer
Dim totunit As Integer
Dim phase As Integer
Dim amount1 As Integer
Dim amount2 As Integer
Dim amount As Integer
Dim amount4 As Integer
Dim unit1 As Integer
Dim unit2 As Integer
Dim amount3 As Integer
Dim totalunit1 As Integer
Dim totalunit2 As Integer
Dim percent1 As Integer
Dim percent2 As Integer
Dim consumeunit As Integer
Rate This program Calculates the Electric Bill by Entering the Current meter reading and previous readin
(2(2 Vote))
Dim cr As Integer
Dim pr As Integer
Dim totunit As Integer
Dim phase As Integer
Dim amount1 As Integer
Dim amount2 As Integer
Dim amount As Integer
Dim amount4 As Integer
Dim unit1 As Integer
Dim unit2 As Integer
Dim amount3 As Integer
Dim totalunit1 As Integer
Dim totalunit2 As Integer
Dim percent1 As Integer
Dim percent2 As Integer
Dim consumeunit As Integer
cr = txtcurrent.Text
pr = txtprevious.Text
totunit = cr - pr
txttotalunits.Text = totunit
If txtphase.Text = "1" Then
unit1 = 50
unit2 = totunit - unit1
totalunit1 = unit1 * 1.3
percent1 = (totalunit1) * (14 / 100)
totalunit2 = unit2 * 3
percent2 = (totalunit2) * (15 / 100)
amount3 = totalunit1 + totalunit2
amount4 = amount3 + 60 + percent1 + percent2 + (totunit * 0.1)
txtamount.Text = amount4
End If
If txtphase.Text = "3" Then
unit1 = 50
unit2 = totunit - unit1
totalunit1 = unit1 * 1.3
percent1 = totalunit1 * (14 / 100)
totalunit2 = unit2 * 3
percent2 = totalunit2 * (15 / 100)
amount3 = totalunit1 + totalunit2
amount4 = amount3 + 150 + percent1 + percent2 + (totunit * 0.1)
txtamount.Text = amount4
End If
End Sub
Private Sub cmdreset_Click()
txtcurrent = ""
txtprevious = ""
txtphase = ""
txttotalunits = ""
txtamount = ""
End Sub
This program Calculates the Electric Bill by Entering the Current meter reading and previous readin Comments
No comments yet — be the first to post one!
Post a Comment