Wednesday 2 May 2018

C Program to Calculate Electric Energy Bill

CODE:

#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


Contact:
Mobile: +91-7276355704
WhatsApp: +91-7276355704
Email: roshanphelonde@rediffmail.com

0 comments:

Post a Comment

Total Pageviews

CONTACT US

Prof. Roshan P. Helonde
Mobile / WhatsApp: +917276355704
Email: roshanphelonde@rediffmail.com

Contact Form

Name

Email *

Message *

Archive

Notes Planet Copyright 2018. Powered by Blogger.