Question: MATLAB- Write a script that will generate a random number 'n' in the range -100 to 100 then attempt to guess what the value of
MATLAB- Write a script that will generate a random number 'n' in the range -100 to 100 then attempt to "guess" what the value of n is by repeatedly generating a new random number in the same range until the two match. The script should then print how many tries it took to guess "n" correctly, as well as the value of n.
For example:
>> guess_n
It took 15 tries to guess n = 27
>> guess_n
It took 97 tries to guess n = -41
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
