Question: write a program in x 8 6 MASM and include irvine library Write a program that does the following: 1 ) Prompt the user to
write a program in x MASM and include irvine library Write a program that does the following:
Prompt the user to enter a decimal number with at least decimal places. Also allow
for the case where the user can enter numbers greater than
Read the user input and display on the screen. Something like the following... The
original number entered was xxxxxx
Prompt the user to enter a precision value between and
Read the user input and display on the screen. Something like the following... You
selected to set the precision to x decimal places.
Round to the specified precision setting and display on the screen. Something like
the following...
Original Number:
Precision : ##Depending on the precision value selected.
Include error messages in the event the user indicates a precision value that is not or
You may not use the rounding instruction for this assignment.
Suggested Approach
The most common method used for this assignment is to
Multiply by the appropriate power of
Convert the value to an integer.
Convert the integer back to a floating point value.
Divide by the appropriate power of
For example, if your value is and the precision is
Multiply by :
Covert the value to an integer:
Convert the value back to a floating point:
Divide by :
The floating point instructions are in Section
Note: Floating Point Values will be displayed in Scientific Notation in the console window.
Extra Credit: Display the number correctly in Decimal Notation not Scientific Notatio
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
