Question: Please help me solve these two Questions by solving using MatLab coding... I need help! Thank you b) Write a MATLAB code that calculates the
b) Write a MATLAB code that calculates the cost of internet usage depending on the number of Megabytes used, if the number of Megabytes entered is negative, the program should print "Wrong entry": (User entered values are indicated in bold) (3 marks) Megabytes 0 to 500 500+ to 1,000 1,000+ to 2,500 2,500+ Cost 4 Dhs 7 Dhs 11 Dhs 17 Dhs Sample output: Please enter Megabytes used: 600 The cost is: 7 Dhs c) Write a MATLAB program that reads a 4-digit integer and checks if the sum of the individual digits is divisible by 3 number or not. (Hint: use the remainder (rem) and the division operations to separate numbers). For example: 2136 2+13+6 12 DIVISABLE BY 3. (User entered values are indicated in bold) (5 marks): Example Enter a 4-digit integer: 2136 The sum of the frur digits is DIVISABLE BY 3
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
