(wL) Forums
Does anyone know how to do this c++ problem - Printable Version

+- (wL) Forums (https://war-lords.net/forum)
+-- Forum: Resources (https://war-lords.net/forum/forum-31.html)
+--- Forum: Programming (https://war-lords.net/forum/forum-33.html)
+--- Thread: Does anyone know how to do this c++ problem (/thread-14993.html)

Pages: 1 2 3


Does anyone know how to do this c++ problem - .kevlar - Feb 03 2015

An ISP has 3 different subscription packages
a) $19.95 per month, 5 hours access. Additional hours
are $0.75 up to 20 hours then $1 for all additional
hours.
b) $24.95 per month, 15 hours access. Additional hours
are $0.75 up to 25 hours then $0.50 for each
hour above this limit.
c) $29.75 per month unlimited access
Write a program that calculates a customers monthly bill. Ask which
package, and how many hours then display the monthly charge. Also, output
when customers should transition to another package to save money.


RE: Does anyone know how to do this c++ problem - John - Feb 03 2015

No idea what c++ is just doing this with basic maths cause im bored.
a) $35 for 25 hrs not including additional
b) $44.70 for 40 hours not inc additional
c) Get C
Sorry i couldnt help Big Grin


RE: Does anyone know how to do this c++ problem - Dragon - Feb 03 2015

Let number of hours be x;
let monthly charge be y;
make a switch case for the choices
then according to the pick calculate the monthly charge
if else loops would be used here
compare the x with the given number of hours in choice like
if(x<=5) elseif(5<x<21)
like this you can calculate the monthly charge.
hope i helped
i might be wrong though Big Grin


RE: Does anyone know how to do this c++ problem - John - Feb 03 2015

I stand by get C.


RE: Does anyone know how to do this c++ problem - Call me when humans go extinct - Feb 03 2015

(Feb 03 2015, 04:58 AM)Dragon Wrote: Let number of hours be x;
let monthly charge be y;
make a switch case for the choices
then according to the pick calculate the monthly charge
if else loops would be used here
compare the x with the given number of hours in choice like
if(x<=5) elseif(5<x<21)
like this you can calculate the monthly charge.
hope i helped
i might be wrong though Big Grin
didnt know you do programming


RE: Does anyone know how to do this c++ problem - Dragon - Feb 03 2015

(Feb 03 2015, 09:52 AM)Angel Wrote:
(Feb 03 2015, 04:58 AM)Dragon Wrote: Let number of hours be x;
let monthly charge be y;
make a switch case for the choices
then according to the pick calculate the monthly charge
if else loops would be used here
compare the x with the given number of hours in choice like
if(x<=5) elseif(5<x<21)
like this you can calculate the monthly charge.
hope i helped
i might be wrong though Big Grin
didnt know you do programming
I do.I think I told you oO


RE: Does anyone know how to do this c++ problem - Call me when humans go extinct - Feb 03 2015

(Feb 03 2015, 10:59 AM)Dragon Wrote: I do.I think I told you oO

really? what do u do? student? or already work?


RE: Does anyone know how to do this c++ problem - Dragon - Feb 03 2015

(Feb 03 2015, 03:07 PM)Angel Wrote:
(Feb 03 2015, 10:59 AM)Dragon Wrote: I do.I think I told you oO

really? what do u do? student? or already work?

just finished my B.tech :v
u ass
you can ask in steam chat :O
bish asss


RE: Does anyone know how to do this c++ problem - Call me when humans go extinct - Feb 03 2015

(Feb 03 2015, 03:16 PM)Dragon Wrote: just finished my B.tech :v
u ass
you can ask in steam chat :O
bish asss

what is B.tech?


RE: Does anyone know how to do this c++ problem - ryz - Feb 03 2015

what is this even for jimmy? lol