Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Code in Python and test a MASM program to perform the following tasks: Display your name and program title on the output screen. Display instructions

Code in Python and test a MASM program to perform the following tasks:

  1. Display your name and program title on the output screen.
  2. Display instructions for the user.
  3. Prompt the user to enter three numbers (A, B, C) in strictly descending order.
  4. Calculate the sum and differences: (A+B, A-B, A+C, A-C, B+C, B-C, A+B+C).
  5. Display the results of the above calculations.
  6. Display a closing message.

Program Requirements

  1. The program must be fully documented and laid out
  2. . This includes a complete header block for identification, description, etc., and a comment outline to explain each section of code.
  3. The main procedure must be divided into the following separate and distinct logical sections:
    1. introduction
    2. get the data
    3. calculate the required values
    4. display the results
    5. say goodbye
  4. When displaying the results, restate the inputs in equation form (e.g. "5 + 4 = 9") rather than using placeholder letters (see the Example Execution below).
  5. The results of calculations must be stored in named variables before being displayed.

Notes

  1. You are not required to handle negative input or negative results. We will not test input that would generate a negative output or overflow.

Example Execution

User input inboldface italics.

Elementary Arithmetic by Wile E. Coyote Enter 3 numbers A > B > C, and I'll show you the sums and differences. First number: 20 Second number: 10 Third number: 5 20 + 10 = 30 20 - 10 = 10 20 + 5 = 25 20 - 5 = 15 10 + 5 = 15 10 - 5 = 5 20 + 10 + 5 = 35 Thanks for using Elementary Arithmetic! Goodbye!

Extra Credit Options

  1. Repeat until the user chooses to quit. (1pt)
  2. Check if numbers are in strictly descending order. NOTE: Strictly Descending means A > B > C (1pt)
  3. Handle negative results and computes B-A, C-A, C-B, C-B-A. (1pt)
  4. Calculate and display the quotients A/B, A/C, B/C, printing the quotient and remainder (see DIV and IDIV instructions). Division by zero need not be properly handled. (2pt)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Quantitative Analysis for Management

Authors: Barry Render, Ralph M. Stair, Michael E. Hanna, Trevor S. Ha

12th edition

133507335, 978-0133507331

More Books

Students also viewed these Algorithms questions

Question

What are the need and importance of training ?

Answered: 1 week ago

Question

What is job rotation ?

Answered: 1 week ago