Question 1 – Flowchart Design
Question 2 – Implementation: From the above flowchart design, build a LC-3 Assembly program that accepts three numbers and displays the smallest and the largest numbers (70 marks)
Your task is to implement the program in the following way:
The program should ask users to enter three positive numbers. Assume that the numbers are less than 10 (one digit), the user only types the correct inputs. Your program should perform a number of simple comparison and processes to print out the smallest and the largest numbers as show below:
Sam Madanian, ID number: 12345678 (line 1 – 10 marks)
Please enter number 1: 3 (line 2 – 10 marks)
Please enter number 2: 2 (line 3 – 10 marks)
Please enter number 3: 5 (line 4 – 10 marks)
The smallest number is: 2 (line 5 – 15 marks)
The largest number is: 5 (line 6 – 15 marks)
There are 6 output lines as shown above:
- If line 1 is correctly shown, 10 marks are rewarded.
- Your student name and ID must be printed out correctly.
- If line 2, 3, 4 are correctly shown, 10 marks each are rewarded.
- Allows the user to enter a number.
- If line 5 is correctly shown, 15 marks are rewarded.
- The correct smallest number is printed to the screen.
- If line 6 is correctly shown, 15 marks are rewarded.
- The correct largest number is printed to the screen.