CS10-8L: Computer Programming Laboratory Machine Problem #3: Variables, Input and Output
CS10-8L: Computer Programming Laboratory Machine Problem #3: Variables, Input and Output
CS10-8L: Computer Programming Laboratory Machine Problem #3: Variables, Input and Output
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_MP3. Ex. Santos_Jared_MP3
2. You will submit a zip file containing the following and send it to BB.
a. PDF file of Machine Problem 3 provided with the screenshot of your answers.
b. MATLAB script with .m extension.
Rubrics
1. Correct output 50
2. Comments 10
3. Design and user interface 20
4. Complete submission of files (Zip 10
files) 10
5. Readability
MACHINE PROBLEM
1. The formula for computing the final amount if one is earning compound interest is given on
Wikipedia as
Write a MATLAB program that assigns the principal amount of 10000 to variable P, assign to n the
value 12, and assign to r the interest rate of 8% (0.08). Then have the program prompt the user for
the number of years, t, that the money will be compounded for. Calculate and print the final
amount after t years.