Monday, August 27, 2012

Calculate Electric Energy Bill

/*****<soeasyprograms.blogspot.in>*****/
#include<stdio.h>
#include<conio.h>
void main()
{
float r,a=2.5,b=3.5,c=1.5;
clrscr();
printf(“enter the readings\n”);
scanf(“%f”,&r);
if(r>=200)
printf(“rupees=%f”,r*b);
else if((r>=100)&&(r<200))
printf(“rupees=%f”,r*a);
else
printf(“rupees=%f”,r*c);
getch();
}

Output:
enter the readings
140
rupees=350 



1 comment:

  1. Environmentalists add that the effects of polluted water will be felt in the next 50 years in most of the local towns and the productive farms due to mining on river catchments and fertile soil.
    Don Blankenship

    ReplyDelete