{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Week_7_LGS_Numerical_Manipulation

# Output number as integer or real as appropriate

This preview shows page 1. Sign up to view the full content.

This is the end of the preview. Sign up to access the rest of the document.

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 Engineering Engineering Education Write a MATLAB script file (m-file) for this code. Run it with pi. LECTURE Engineering Engineering 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. LECTURE Engineering Engineering Education Engineering Engineering Education Convert this flowchart to MATLAB code. Paste here: LECTURE Engineering Engineering Education Engineering Engineering Education Exercise: Individual work: (5 minutes) The MATLAB ‘randi’ function will generate ramdom integers. Try typing: randi(20) You should get a random integer between 1 and 20. Modify your ‘game’: ask the user if they would prefer randomly selected...
View Full Document

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern