Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a MARIE assembly language program that calculates and displays the perimeter or the area of a rectangle , given the length of each side

Write a MARIE assembly language program that calculates and displays the perimeter or the area of a rectangle, given the length of each side, depending on the users input.

The user should be prompted to enter the length of each of the sides; once these values have been read by the program, provide the user with the options to select which calculation to perform on the rectangle, and prompt them to enter one of the options.

For example: Enter Perimeter(P) or Area(A)

The application should accept a character corresponding to one of the actions: P for Perimeter or A for Area. The output statements should accurately describe the results being displayed. For example, if the input is:

4 (for one side)

5 (for the other side)

A (for calculation type)

Your program should print something like this:

The area of the rectangle is 20.

Your program should be preceded by a comment block with your name, the course and section numbers, the project name, the program purpose, along with a description of the input and a description of the output. Be sure to include appropriate comments throughout your code, choose meaningful identifiers, and use indentation as shown in your textbook and in class. Your filename should be RectangleOperations.mas.

Submit your program by uploading it in the Assignment link in Blackboard.

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

Step: 3

blur-text-image

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

More Books

Students also viewed these Databases questions

Question

1. What are your creative strengths?

Answered: 1 week ago

Question

What metaphors might describe how we work together?

Answered: 1 week ago