Program to calculate electricity bill

0
8
#include<stdio.h>
#include<conio.h>
void main()
{
   float bill,rate;
   int prev,prs,tu;        /* previous meter reading, present meter reading 
                              and total units */
   clrscr();
   printf("\n Enter previous mt reading, present mt reading and rate per unit\n");
   scanf("%d%d%f", &prev,&prs,&rate);
   tu=prs-prev;
   bill=tu*rate;
   printf(" Total bill amount is = Rs %.2f \n",bill); 
   getch();
}
   Output: 
   Enter previous mt reading, present mt reading and rate per unit
   800 950 2.45
   Total bill amount is = Rs 367.50

The following program illustrates common mathematical functions used in trigonometry. These functions are kept in math.h header file and take angle in radians as argument gives the result as float values.

 

:

Program to calculate electricity bill program to calculate electricity bill in cc program to calculate electricity bill write a c program to calculate electricity bill how to calculate electricity bill program how to calculate electricity bill in c program write a program to calculate the electricity bill

LEAVE A REPLY

Please enter your comment!
Please enter your name here