Write a Flowgorithm program that will calculate a mobile phone bill based on the customer plan and the data used. The program should perform the following:
Max Function
Statistical function is of many categories. One of them is a MAX function. The MAX function returns the largest value from the list of arguments passed to it. MAX function always ignores the empty cells when performing the calculation.
Power Function
A power function is a type of single-term function. Its definition states that it is a variable containing a base value raised to a constant value acting as an exponent. This variable may also have a coefficient. For instance, the area of a circle can be given as:
Write a Flowgorithm
The program should perform the following:
- Prompt for input of customer name
- Prompt for input of customer’s mobile plan
- Prompt for input of number of gigabytes of data used
- If the plan choice is invalid or gigabytes used is less than zero (0) display a message and terminate program
- Calculate the monthly bill based on plan & data usage
- Display customer name, plan and monthly mobile charges
Mobile data plans are:
Plan A |
19.99/month, w/6 gigs of data, additional data $8.50/gig |
Plan B |
29.99/month, w/10 gigs of data, additional data $3.50/gig |
Plan C |
39.99/month, unlimited data |
Trending now
This is a popular solution!
Step by step
Solved in 3 steps