Write A x++ Program To Find Electricity Bill

static void Job8(Args _args)
{
int units=450,bill;
real a,b,c;
a =1.20;
b =2;
c=3;

if(units<=100)
{
bill=units*a;
}
else if(units<=300)
{
bill=100*a+(units-100)*b;
}
else
{
bill=100*a+200*b+(units-300)*c;
}

info(strFmt(“%1”,bill));

}

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s