Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Matlab Lab 6 Fall 2020 Question 1: Write a program that calculates and prints the bill for a cellular company using three plans: Plan Minutes

Matlab
image text in transcribed
Lab 6 Fall 2020 Question 1: Write a program that calculates and prints the bill for a cellular company using three plans: Plan Minutes SMS Monthly Rental Regular 600 30 50 AED Special 1000 70 75 AED Premium 1600 100 100 AED Local calls out of the included minutes are charged as 0.2 fils per second Local SMSs out of the included SMSs are charged as 10 fils per SMS . i. ii. Ask the user to enter the account number. A valid account number must contain 5 digits. If the user inputs an invalid account number the user must re-enter the account Ask the user to enter the plan code (The user will enter r or R for Regular service, s or S for Special service and p or P for Premium service). Assume correct input by the user Ask the user to enter the number of minutes and number of messages. You may assume that the user will not enter a negative number. Calculate the amount due and print all entered details it to the screen. iii. iv. Sample Run: Welcome to our bill calculator. Please enter the Account Number: 467285 Incorrect account! Please re-enter Account Number: 46728 Please enter the Plan Code: R Please enter Number of Minutes: 1230 Please enter Number of Messages: 340 Account Number: 4672 Plan: R Number of Minutes: 1230 Number of Messages: 340 Total Bill: 10710 AED

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions