Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Please run this code in MARIE Simulator and fix any occured errors. Objective of

ID: 672856 • Letter: P

Question

Please run this code in MARIE Simulator and fix any occured errors. Objective of code is to print area of rectangle by having user input width and length of said rectangle.

   ORG 100
   Input //getting the number to accumulator
   Store m //storing value of length in location 'm'
   Output m //exhibit area of rectangle
   Input k //take input width
   Store k //store k value in the location
   Output k //show the key value for k

//Loop started//
Load k //loading the value
loop;   Subt k One //Deduct 1 from the k awaiting 0
Store k //Save the AC
Load a   
Add m //Insert m to a
Store a
Skipcond 00d //leave out when k knock 0
Jump 007 //indirect jump to return
Output a //display
Halt //stop

P, Dec 0 //accumulate
Q, Dec 0 //constant value
R, Dec 0 //loopp
End

Explanation / Answer

Write an algorithm that displays the area of a rectangle by accepting length and width from the user.

A.         a.

Input

Processing

Output

length, width

Accept length, width

Calculate area

Store results in area

Display area

Area

Step 1: start

Step 2: read length, width

Step 3: area ß length * width

Step 4: write area

Step 5: stop

Write sum

c.         Program to accept the length and width of a rectangle and calculate its area.

                                               

                                   

                                                        

area = length * width

Input

Processing

Output

length, width

Accept length, width

Calculate area

Store results in area

Display area

Area

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote