Lab1 Ex1
You cannot submit for this problem because the homework's deadline is due.
Ex1. A+B problem (2 marks)
Write a MATLAB script that gets two numbers a
and b
from user input and prints the value of a + b
.
Hint: Use the built-in function input()
to get input from the user. The test cases are updated and now using empty prompt should be the correct answer. If you already submitted a version with empty prompt, please send private message to TA Yatian Liu for regrade.
MATLAB has extensive high quality documentation. Make good use of it! Type help input
or doc input
in the command window to learn how to use input()
. The same applies to any built-in function.
Sample Test Case
Input:
-1
5.2
Output:
4.2000
Lab1 Exercises
- Status
- Finished
- Problems
- 5
- Open Since
- 2021-05-20 18:15
- DDL
- 2021-05-22 22:00
- Extension
- 150.0 hour(s)