I have a Javascript question need a task of calculating a telephone bill.need to Begin the program with an alert to welcome the user to the program.Here are the tasks that must be completed.
Ask the user for the number of minutes the person used the phone
Ask the user for the per minute rate
Be sure to convert each of the numbers received from the prompt statements because they are string and must be converted to numbers.
Calculate the cost (# of minutes the person used the phone * per minute rate)
Use a confirm method to ask the user "Add city tax?" If the user selects "OK" you will calculate the city tax by multiplying the cost by 12% and display the results.
If the user selects "Cancel" you will display an alert stating "No city tax".
Use a confirm method to ask the user "Is there is a charge for line maintenance?" If the user selects "OK" you will add $5 to the total cost.
If the user selects "Cancel" you will display an alert stating "No line maintenance".
The output for the program should look like:
Telephone Bill
# of minutes used: 3000
Rate per minute: .02
Cost: $60.00
City Tax: $7.20
Line maintenance: $5.00
Total Cost: $72.20