answersLogoWhite

0


Best Answer

#include<stdio.h>

#include<string.h>

#include<conio.h>

void main()

{ int cust_no, unit_con;

float charge,surcharge=0, amt,total_amt;

char nm[25];

clrscr();

printf("enter the customer IDNO :\t");

scanf("%d",&cust_no);

printf("\nenter the customer Name :\t");

scanf("%s",nm);

printf("\nenter the unit consumed by customer :\t");

scanf("%d",&unit_con);

if (unit_con <200 )

charge = 1.20;

else if (unit_con>=200 && unit_con<400)

charge = 1.60;

else if (unit_con>=400 && unit_con<600)

charge = 2.00;

else

charge = 2.50;

amt = unit_con*charge;

if (amt>300)

surcharge = amt*15/100.0;

total_amt = amt+surcharge;

if (total_amt < 25)

total_amt =25;

clrscr();

printf("\t\t\tElectricity Bill\n\n");

printf("Customer IDNO :\t%5d",cust_no);

printf("\nCustomer Name :\t%s",nm);

printf("\nunit Consumed :\t%5d",unit_con);

printf("\nAmount Charges @Rs. %4.2f per unit :\t%8.2f",charge,amt);

printf("\nSurchage Amount :\t%8.2f",surcharge);

printf("\nNet Amount Paid By the Customer :\t%8.2f",total_amt);

getch();}

User Avatar

Wiki User

12y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is a program to print electricity bill?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Program for electricity bill using if-else ladder in c?

if (has_enough_money) { pay_the_bill(); }


Write a unix program to print print a pattern?

echo 'print a pattern'


What is the journal entry of electricity bill?

Debit electricity expensesCredit cash / bank


Write an assembly language program to print a to z on screen?

write a program to print A to Z on screen in c?


Which is a program embedded in firmware that manages print jobs?

Print Server


What is the journal entry for electricity bill paid in cheque?

debit electricity billcredit bank


Where can you get your electric bill payment history?

Most electrical power companies keep your records on a computer. Usually, if you request it, they can and will do a print-out for you. Usually, this record is only available for the last 12 months. My power company provider in SE Texas will provide such a print-out free of charge, and will mail it to me.


What is journal posting on electricity bill?

how do i post electricity bill owe for 4 months back


How do you print from compaq laptop?

Use the option File / Print in the program you are using.


What is the average electricity bill in Ohio?

The average electricity bill in Ohio varies depending on the type of home you live in. The average electricity bill can range from $30 for an apartment to $90.


What is the average electricity bill for people in Britain?

The average electricity consumption is 4,800 kWh per is average UK electricity bill is &pound;669.60


How do you print the answer you get?

Select the answer, copy and paste into a word processing program, and print as you would print any other document.