Professional Documents
Culture Documents
Machine Problem 5
Machine Problem 5
Name: Score:
Section: Date:
OBJECTIVES
● To familiarize the students with the MATLAB interface.
● To enable the students to use some basic operations.
Instructions:
1. Save your file as Surname_Firstname_MP5. Ex. Santos_Jared_W4L5
2. You will submit a zip file containing the following and send it to BB.
a. PDF file of Machine Problem 4 provided with the screenshot of your answers.
b. MATLAB script with .m extension.
MACHINE PROBLEM
Create a program that will ask input from the user of their age. If the user input value
lower than 18, then you have to display “The user is not of legal age yet” and the
program will then exit. If the user input higher than 17, you have to ask for another input
about gender.
If the user responds “M” then display “Your input is within the range of legal age
for Male” if the input is higher than 20, otherwise display “Your input is not within
the range of legal age for Male”.
If the user responds “F” then display “Your input is within the range of legal age for
Female” automatically.
Clear the window every time you are going to run the script.
https://www.coursehero.com/file/106316174/Machine-Problem-5docx/
CS10-8L: Computer Programming Laboratory
Machine Problem #5: Conditional
https://www.coursehero.com/file/106316174/Machine-Problem-5docx/
CS10-8L: Computer Programming Laboratory
Machine Problem #5: Conditional
https://www.coursehero.com/file/106316174/Machine-Problem-5docx/
Powered by TCPDF (www.tcpdf.org)