Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

PLEASE, if you're not sure about the answers don't just copy and paste them from other websites. One way to calculate the harmonic mean of

PLEASE, if you're not sure about the answers don't just copy and paste them from other websites.

image text in transcribed

image text in transcribed

One way to calculate the harmonic mean of two numbers x and y is using the expression 2xy x + y Complete the following windows32 program to input two numbers and calculate and display their harmonic mean in dddd.dd format. The boxed areas indicate where code is missing. ; student's name here ; program to input two numbers, ; then calculate and display their harmonic mean ; current date here .586 .MODEL FLAT INCLUDE io.h ; header file for input/output STACK 4096 .DATA DWORD DWORD prompti BYTE prompt2 BYTE inArea BYTE mean BYTE meanLbl BYTE meanOut BYTE "First number", 0 "Second number", 0 20 DUP (?) 11 DUP (?), O "Harmonic mean", 0 4 DUP (?), '.', 2 DUP (?), O .CODE _MainProc PROC input atod mov prompti, inArea, 20 inArea X, eax ; read ASCII characters ; convert to integer ; store in memory ; repeat for second number 3 (continued) ; calculate 100* (harmonic mean) in EAX dtoa mean, eax ; convert to ASCII characters ; copy digits, one at a time to meanout ; output label and mean e ax, O ; exit with return code 0 mov ret _MainProc ENDP END ; end of source code One way to calculate the harmonic mean of two numbers x and y is using the expression 2xy x + y Complete the following windows32 program to input two numbers and calculate and display their harmonic mean in dddd.dd format. The boxed areas indicate where code is missing. ; student's name here ; program to input two numbers, ; then calculate and display their harmonic mean ; current date here .586 .MODEL FLAT INCLUDE io.h ; header file for input/output STACK 4096 .DATA DWORD DWORD prompti BYTE prompt2 BYTE inArea BYTE mean BYTE meanLbl BYTE meanOut BYTE "First number", 0 "Second number", 0 20 DUP (?) 11 DUP (?), O "Harmonic mean", 0 4 DUP (?), '.', 2 DUP (?), O .CODE _MainProc PROC input atod mov prompti, inArea, 20 inArea X, eax ; read ASCII characters ; convert to integer ; store in memory ; repeat for second number 3 (continued) ; calculate 100* (harmonic mean) in EAX dtoa mean, eax ; convert to ASCII characters ; copy digits, one at a time to meanout ; output label and mean e ax, O ; exit with return code 0 mov ret _MainProc ENDP END ; end of source code

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

The New Yellow Book Government Auditing Standards

Authors: Rebecca A. Meyer

1st Edition

1119784638, 978-1119784630

More Books

Students also viewed these Accounting questions

Question

Develop a program for effectively managing diversity. page 303

Answered: 1 week ago

Question

List the common methods used in selecting human resources. page 239

Answered: 1 week ago