answersLogoWhite

0

#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

13y ago

What else can I help you with?

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'


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 of electricity bill?

Debit electricity expensesCredit cash / bank


How do you print from compaq laptop?

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


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.


How to print a jet airways ticket?

If your screen does not give you an option to Print then save the document to a word program and print from there.


Q2 Write a program to print even numbers between 10 and 50?

You can use int i; for (i = 10; i &lt;= 50; i += 2) {//print i} as a program to print even numbers between 10 and 50.


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

debit electricity billcredit bank


How do you go to print preview?

It depends on the program, but usually it's in the "Print" dialogue box.


To print my metro pcs bill?

To print your MetroPCS bill, first log in to your account on the MetroPCS website or the T-Mobile app. Navigate to the billing section to view your current or previous bills. Once you locate the bill you want to print, select the option to download or print it, and then use your printer settings to print the document. If you prefer, you can also request a paper bill to be mailed to you.