Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Please I want the program to be written in matlab. Help me out please.. Write a program that takes a number as input from the
Please I want the program to be written in matlab.
Help me out please..
Write a program that takes a number as input from the user. Then it calculate and returns the total electricity bill based on the followings: For first 50 units (i.e., 1-50) Rs. $0.50/unit For next 100 units (i.e., 51-150) Rs. $0.75/unit For next 100 units (i.e., 151-250) Rs. $1.20/unit For unit above 250 Rs. $1.50/unit An additional surcharge of 20% is added to the bill If the input is not a positive number, your program must output a sensible message and finish. So, for instance, here is the calculation you need to do for 750 unit:50*$0.50+100*$1.20+500*$1.50 + surchargeStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started