Topic: Use of scalars and operator precedence
Related Reading: Ch. 1 as well as lecture notes
Please make sure you adhere to the policies on academic integrity.
You are to submit a single m-file that outputs the resulting assignments for each of the following problems, in the given order. Please make sure that your name is given in comments at the beginning of the m-file and ensure that no output is generated by your scripts other than the resulting answers.
Submit your m-file to the email address dferry_submit@slu.edu, and bring a printed copy to class.
Calculate and display the variable
to represent a 25 year old college graduate making a $10,000 investment
that grows at a rate of 8% over 40 years (until retirement at the age of 65).
Consider also the assignment
that represents the same individual waiting ten years to make the same investment.
Then compute and display
Set the variables
and then
calculate and display
Note: you may use built-in functions sqrt and abs.