1. The following Little Man program is supposed to add two input numbers, subtract a third input number from the sum, and output the result, i.e., OUT = IN1 + IN2 – IN3 Mailbox Mnemonic Code Numeric Code 00 IN 901 01 STO 90 390 02 IN 901 03 04 ADD 90 190 STO 90 390 05 IN 901 06 SUB 90 290 07 OUT 902 08 COB 000 What is wrong with this program? Modify the program so that it produces the correct result. 2. Write a Little Man program that accepts three values as input and produces the largest of the three as output.

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter8: Arrays And Strings
Section: Chapter Questions
Problem 22PE
icon
Related questions
Question
1. The following Little Man program is supposed to add two input
numbers, subtract a third input number from the sum, and output
the result, i.e., OUT = IN1 + IN2 – IN3
Mailbox Mnemonic Code
Numeric Code
00
IN
901
01
STO 90
390
02
IN
901
03
ADD 90
190
04
STO 90
390
05
IN
901
06
SUB 90
OUT
290
07
902
08
СОВ
000
What is wrong with this program? Modify the program so that it
produces the correct result.
2. Write a Little Man program that accepts three values as input and
produces the largest of the three as output.
Transcribed Image Text:1. The following Little Man program is supposed to add two input numbers, subtract a third input number from the sum, and output the result, i.e., OUT = IN1 + IN2 – IN3 Mailbox Mnemonic Code Numeric Code 00 IN 901 01 STO 90 390 02 IN 901 03 ADD 90 190 04 STO 90 390 05 IN 901 06 SUB 90 OUT 290 07 902 08 СОВ 000 What is wrong with this program? Modify the program so that it produces the correct result. 2. Write a Little Man program that accepts three values as input and produces the largest of the three as output.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 6 images

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning