C++
Programming and Technical
General Ability
General Knowledge
program to code electric bill where first 100 unit would cost 50 rupee and next 200 would cost 500 an over 300 would cost 5000 rupee
Read Solution (Total 2)
-
- Its simple,
lets keep the value of the bill in a integer
----------------------------------------
int units=300;
float cost=0;
if(units/100==1)
cost=cost+50;
if(units/100>1 && units/1003)
cost=5550; - 8 years agoHelpfull: Yes(1) No(2)
- #include
#include
void main()
{
int x;
cin>>x;
if(x - 7 years agoHelpfull: Yes(0) No(2)
C++ Other Question