write a program using DO WHILE LOOP
Write a program that computes the cost of a long distance call. The cost of the call is determined
according to the following rate schedules.
a. A call made between 8:00 AM and 6:00 PM is billed at a rate of 6 rupees per minute.
b. A call made before 8:00 AM or after 6:00 PM is charged at a rate of 3.75 rupees.
According to this schedule, if a call starts at any time between 8:00 AM and 6:00 PM, and it ends
after 6:00 PM then it will be charged at the rate of 6 rupees per minute for the time before 6:00
PM and for the rest of the time the rate will be 3.75 rupees per minute. For example if a call
starts at 5:55 PM and ends at 6:05 PM then the charges on this call will be 48.75 (30 rupees for
first 5 minutes and 18.75 rupees for rest of the time).
Similarly if a call starts at the time before 8:00 AM but ends after 8:00 AM then it will be
charged at the rate of 3.75 rupees for the time before 8:00 AM and for remaining minutes after
8:00 AM the rate will be 6 rupees per minute. For example if a call starts at 7:49 AM and ends at
8:01 AM the charge on that call will be 47.25 rupees (41.25 for first 11 minutes and 6 rupees for
The input to the program will consist of the time the call started, and the length of call in
minutes. The output will be the cost of call. The time is to be input in 24-hours notation, so the
time 1:30 PM is input as 13:30. The time will be input using two variables of type int, one used
for hour and other used for minutes. The number of the minutes for length of the call will also be
input as a value of type int.
After completing the program test it for following inputs. (first try to judge the answers manually
and then compare the values with the program output. I may be applying different test data to
test your program).
8: 21 10 60
Programming - Write a pseudocode program that asks the user for an integer ...
programming - Write a program which allows user to enter 10 student names and ...
programming MIPS ask 3 - Write a MIPS assembly language program for the ...
Programming - (i) What is binary tree (ii) Write a program to multiply any two ...
programming - How to write a program to create a class roster using an array? ...
Programming - I need your help to write a program using visual basic 2010 for ...
Programming - Write a program that would calculate and display the results for ...
Linear Programming - Tab 1: Linear Program: 50 points Consider the Linear ...
Programming in c++ - Draw a flow-chart and Write a program that asks the user ...
C Programming - Write a program that prompts the user to enter a temperature, ...