Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. Prompt the user to enter the value of N and the size of the numbers. 2. Validate the input to ensure that the values

1. Prompt the user to enter the value of N and the size of the numbers. 2. Validate the input to ensure that the values are valid decimal numbers and within the predetermined size range. If the user inputs an invalid value, print an error message and request input again. 3. Create a loop to read each number inputted by the user as a string and convert it to a variable-sized integer number in BCD format. 4. Store each variable-sized integer number in memory. 5. Calculate the sum and average of the numbers stored in memory. 6. Print the sum and average to the console.

Software Needed: Any of the followings would do: - Emu8086 - Online Assemblers and IDEs - TASM.exe and TLINK.exe - DEBUG running on DosBox An Example: - Assume N is 3, and size of the integers is 10 Bytes - User inputs the following: 99887766554433221100 first number, 20 digits stored in 10 Bytes 23323478649873 second number, 16 digits stored in 10 Bytes 2174396053908547860A Error, this is not Decimal 3232332213221332321321321 Error, this is larger than 10 Bytes

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

More Books

Students also viewed these Databases questions