Question

Using the console32 framework, write a complete assembly language program that computes in EAX the perimeter (2*length +...

Using the console32 framework, write a complete assembly language program that computes in EAX the perimeter (2*length + 2*width) of a rectangle where the length and width are in memory doublewords.

ASSEMBLY LANGUAGE

console 32

0 0
Add a comment Improve this question Transcribed image text
Answer #1

answer:

#include <iostream>
using namespace std;

void Compute( float length, float width, float& perimeter, float& area ) {
perimeter = 2 * ( length + width );
area = length * width;
}

int main( int argc, char** argv ) {
float len, wid, per, a;
cout << "Please enter the length of the rectangle: ";
cin >> len;
cout << "Please enter the width of the rectangle: ";
cin >> wid;


Compute( len, wid, per, a );

cout << endl <<
"The perimeter of the rectangle is: " << per << endl <<
"The area of the rectangle is: " << a << endl;
}

Add a comment
Know the answer?
Add Answer to:
Using the console32 framework, write a complete assembly language program that computes in EAX the perimeter (2*length +...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT