OBJECT: Write a generalized program
to prepare Electricity Bill.
10 REM * PROGRAM TO
PREPARE ELECTRICITY BILL *
20 CLS
30 INPUT “ENTER CONSUMER NAME ------ ”; CN$
40 INPUT “ENTER METER NUMBER--------- ”; MN$
50 INPUT “ENTER PREVIOUS READING---- ”; PV
60 INPUT “ENTER PRESENT READING------ ”; PR
70 UC = PR- PV
80 AMT = UC * 1.25
90 CLS
100 PRINT TAB(30)“ELECTRICITY BILL”
110 PRINT TAB(30)“-------------------------- ”
120 PRINT
130 PRINT TAB(20)“CONSUMER NAME------ ”; CN$
140 PRINT TAB(20)“METER NUMBER-------- ”; MN$
150 PRINT TAB(20)“PREVIOUS READING----“; PV
160 PRINT TAB(20)“PRESENT READING------“; PR
170 PRINT : PRINT
180 PRINT TAB(20) “UNIT CONSUMED----------“; UC
190 PRINT TAB(20) “AMOUNT CHARGED------“; AMT
200 END
0 comments:
Post a Comment