Question: Write a MATLAB program that checks if a number is even and if it is an integer multiple of 3. Examples: 12 is both even
Write a MATLAB program that checks if a number is even and if it is an integer multiple of 3.
Examples: 12 is both even and an integer multiple of 3
9 is just an integer multiple of 3 and not even
8 is just even and not an integer multiple of 3
5 is neither even nor an integer multiple of 3
Allow the user to input a number
Assume this input is valid the user enters a positive integer
Output Even Number and/or Integer Multiple of 3 as appropriate
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
