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

1 Expert Approved Answer
Step: 1 Unlock

Certainly Below is a MATLAB script that generates seven random integers in the specified rang... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!