VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



This program Calculates the Electric Bill by Entering the Current meter reading and previous readin

by Sameer Tokkar (1 Submission)
Category: Math/Dates
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Sun 7th November 2004
Date Added: Mon 8th February 2021
Rating: (1 Votes)

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



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

Download this snippet    Add to My Saved Code

This program Calculates the Electric Bill by Entering the Current meter reading and previous readin Comments

No comments have been posted about This program Calculates the Electric Bill by Entering the Current meter reading and previous readin. Why not be the first to post a comment about This program Calculates the Electric Bill by Entering the Current meter reading and previous readin.

Post your comment

Subject:
Message:
0/1000 characters