1. Engineering
  2. Computer Science
  3. create a marie assembly program that calculates and displays the...

Question: create a marie assembly program that calculates and displays the...

Question details

Create a MARIE assembly program that calculates and displays the area of a rectangle, given a rectangles height and width, then calculates how many times larger a given area is than the area of the rectangle.

The MARIE program will be prompted to enter the length and width as decimal values; once these values have been read by the program, the area of the rectangle must be calculated and output. The program must then prompt for an area as a decimal value. Once input, the program will calculate and output how many times bigger the given area is than the area of the given rectangle. The program must then properly terminate. For example, if the input is:

4 (Length)

5 (Width)

100 (Area)

Your program should print:

20

5

            A few notes:

  • “Prompting” the user for input should consist solely of the input instruction being executed. No string should be output to the console to inform the user what data is being requested, rather the first input should always be the length, the second the width, and the third an area.
  • When calculating how many times bigger the given area is than the area of the given rectangle, calculate to the nearest whole number. Do not attempt to calculate decimal numbers.
  • A given area may be smaller than the calculated area.
  • You must comment on your program.

When finished, upload your completed .mas file to Blackboard. The .mas file must be named Assignment1.mas and you should only upload your .mas file. Do not upload any of the other files generated by MARIE.

Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution