This preview shows page 1. Sign up to view the full content.
Unformatted text preview: e.
Run it with pi. Screen grab code and results here. Output number as integer or real as appropriate. (Screen grab example…..) LECTURE
Education Write a MATLAB script file (m-file) for this
code. Run it with pi. LECTURE
Education Exercise: Individual work: (8 minutes) Create a ‘multiplication game’
algorithm that allows the user to enter
two integers then compare the user
response (input of product) to the
actual product. Output appropriate
text for correct and incorrect. Sketch a
flowchart on the next slide.
Education Convert this flowchart to MATLAB code.
Paste here: LECTURE
Education Exercise: Individual work: (5 minutes) The MATLAB ‘randi’ function will generate
ramdom integers. Try typing:
You should get a random integer between 1 and
Modify your ‘game’: ask the user if they would
prefer randomly selected...
View Full Document
This note was uploaded on 01/28/2014 for the course ENGE 1114 taught by Professor Twknott during the Spring '06 term at Virginia Tech.
- Spring '06