Question: Write a script that will generate seven random integers in the range [-100:200] inclusive and then print the value of each integer and whether it
Write a script that will generate seven random integers in the range [-100:200] inclusive and then print the value of each integer and whether it is positive or negative and whether it is even or odd.
An output from this program might be:
-57 is negative and odd.
26 is positive and even.
If zero is one of the random integers generated, remember that zero is even and neither negative or positive.
Hint: even numbers are divisible by 2 with no remainder.
Solve it in MATLAB
Step by Step Solution
There are 3 Steps involved in it
Certainly Below is a MATLAB script that generates seven random integers in the specified rang... View full answer
Get step-by-step solutions from verified subject matter experts
