//prg to calc elec bill using if
//Downloaded From www.c4cpp.co.nr. (C)2009.All rights reserved.
#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
float r,a,u;
cout<<"Enter Your Rn + Elec Bill"<<endl;
cin>>r>>u;
if(a<=100)
a=u*.40+50;
else
if((u>100) && (u<=300))
a=100*.40 + (u-100)*.50 + 50;
else
a=(100*.4 + 200*.50 + (u-300)*.60 + 50);
cout<<"Bill = "<<a;
getch();
}
Programs Can Also Be Downloaded From The Folders Below....[Or Scroll Down]
Calculate Bill
Click Here To Download C++ File Of This Program
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment