A + B Problem
You cannot submit for this problem because the homework's deadline is due.
This problem does not count any score! It aims to get you familiar with how JOJ works. Feel free to submit and explore JOJ.
Description
You program should take two inputs from two lines and use disp()
to print their sum.
Sample test case
INPUT:
0
1
OUTPUT:
1
File naming
The file name of your code should be ex1.m
Solution
Your code inside ex1.m
should be
a = input('');
b = input('');
disp(a + b);
How to submit
You should zip ex1.m
into a *.zip
file and submit it to JOJ.
Misc.
If everything is correct, you should get 4 Accepted
for 4 testcases.
You should not output anything else (instructions, etc.) other than those required by the problem description. JOJ judge the correctness of your output by comparing it with the standard output character by character.
Negative Example:
a = input('Input the first number: '); % has input instructions
b = input('') % echoing isn't supressed
disp(['a+b=', num2str(a + b)]); % has output instructions
If you have any question, post it on Piazza and we are glad to help!
Get familiar with JOJ
- Status
- Finished
- Problems
- 1
- Open Since
- 2022-09-15 00:00
- DDL
- 2022-09-27 23:59
- Extension
- 0.0 hour(s)