S
sara
i am studying a computer engineering and i started taking programming
using C++ since month
i have question i think it`s easy for you all *prof.programmer* but
it`s bit diffecult for me plzz i need your help. this is the
question:
** A new telephone communication company needs a billing calculation
program. The cost of a call is based on the following three inputs that
should be entered by the user, and they are explained as follows.
1. Call Destination. Destination rates are calculated as shown below.
Note that only the cost of a local call is specified (should be
declared as constant); all other rates are calculated in terms of the
local rate.
a. For local calls ( L ), the cost is AED 0.35 / min
b. For national calls ( N ), the cost is 170% of a local call
c. For intra-continental calls ( I ), the cost is 210% of a local call
d. For inter-continental calls ( O ), the cost is 300% of a local call
2. Call Time. There are two rates based on the call time as shown
below, a normal rate and a discounted rate (should be defined as
constant). Although input times are shown in a 12-hour based clock, it
is emphasized that a 24-hour based clock should be used in your
program.
a. If the call is between 6 am and 9 pm, no discounts are applicable
b. If the call is between 9 pm and 6 am, a discount of 20% on the call
rate is in effect
3. Call Duration. Once the rate of a call is calculated as based on the
first two factors, it is multiplied by the call duration (given in
minutes) for determining the cost of a call.
Write a program that collects the aforementioned input for a specified
number of calls, calculates the cost of each input call, and displays
output information accordingly to the user. The program should accept
input in triplets. If some discount is applied, the program should
display such information along with the cost of the call. The following
input/output example helps make clear how the program interacts with
the user. Note that input by the user is shown in normal font, and that
computer-generated text is shown in boldface.
using C++ since month
i have question i think it`s easy for you all *prof.programmer* but
it`s bit diffecult for me plzz i need your help. this is the
question:
** A new telephone communication company needs a billing calculation
program. The cost of a call is based on the following three inputs that
should be entered by the user, and they are explained as follows.
1. Call Destination. Destination rates are calculated as shown below.
Note that only the cost of a local call is specified (should be
declared as constant); all other rates are calculated in terms of the
local rate.
a. For local calls ( L ), the cost is AED 0.35 / min
b. For national calls ( N ), the cost is 170% of a local call
c. For intra-continental calls ( I ), the cost is 210% of a local call
d. For inter-continental calls ( O ), the cost is 300% of a local call
2. Call Time. There are two rates based on the call time as shown
below, a normal rate and a discounted rate (should be defined as
constant). Although input times are shown in a 12-hour based clock, it
is emphasized that a 24-hour based clock should be used in your
program.
a. If the call is between 6 am and 9 pm, no discounts are applicable
b. If the call is between 9 pm and 6 am, a discount of 20% on the call
rate is in effect
3. Call Duration. Once the rate of a call is calculated as based on the
first two factors, it is multiplied by the call duration (given in
minutes) for determining the cost of a call.
Write a program that collects the aforementioned input for a specified
number of calls, calculates the cost of each input call, and displays
output information accordingly to the user. The program should accept
input in triplets. If some discount is applied, the program should
display such information along with the cost of the call. The following
input/output example helps make clear how the program interacts with
the user. Note that input by the user is shown in normal font, and that
computer-generated text is shown in boldface.