1. Identification and solving of simple real life or scientific or technical problems, and developing flow charts for the same.
1. Identification and solving of simple real life or scientific or technical problems, and developing flow charts for the same. Write a program to calculate the electricity bill, we must understand electricity charges and rates. /* 1 - 100 unit - 1.5/= 101-200 unit - 2.5/= 201-300 unit - 4/= 300 - 350 unit - 5/= above 300 - fixed charge 1500/= for example */ This program can explain as follows Declare total unit consumed by the customer using the variable unit. If the unit consumed less or equal to 100 units, calculates the total amount of consumed =units*1.5 If the unit consumed between 100 to 200 units, calculates the total amount of consumed=(100*1.5)+(unit-100)*2.5) If unit consumed between 200 to 300 units ,calculates total amount of consumed=(100*1.5)+(200-100)*2.5+(units-200)*4 If unit consumed between 300-350 units ,calculates total amount of consumed=(100*1.5)+(200-100)*2.5+(300-200)*4+(units-350)*5 If...
Comments
Post a Comment