Machine Problem 5
Machine Problem 5
Machine Problem #5
Name: Score:
Section: Date:
OBJECTIVES
● To familiarize the students with the MATLAB interface.
Instructions:
1. Save your file as Surname_Firstname_MP8. Ex. Santos_Jared_MP8
2. You will submit a zip file containing the following and send it to BB.
a. PDF file of Machine Problem 8 provided with the screenshot of your answers.
b. MATLAB function script with .m extension.
Time: 2:20pm
Program: BSIE
Course: CS10-8L
Section: B20
%}
MACHINE PROBLEM:
Using a repetition, write a program that will ask the user to enter a character from left or right. Then, the user will enter a number. The program should generate a ladder of an integer
from 1-9 only, wherein the level depends on the number entered, and the character should dictate whether it faces right or left.
SAMPLE OUTPUT:
Input a Character: R
Input a Number: 3
Output
1
22
333
Input a Character: R
Input a Number: 6
Output:
22
333
55555
666666
Input a Character: L
Input a Number: 5
Output: