Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write an assembly language program (windows32) The main procedure should prompt the user to enter 15 integers between the values of -10 and 10 inclusively,

Write an assembly language program (windows32)

  • The main procedure should prompt the user to enter 15 integers between the values of -10 and 10 inclusively, one at a time. The main procedure should store these values into an array in the ordered entered as they are entered.
  • Only after the array has been populated should the main procedure then display the contents of the array, in the order they were entered, all in one single output.
  • Then the main procedure should traverse the array. For each element in the array, the value and it position in the array (its index value) should be passed to a procedure called positionalMath. This procedure should do the following:
  • If the value is even, then multiply this value by its index position plus one. Otherwise, if the value is odd, divide this value by its index position plus one. (For instance, if the value passed is 8 and the index position passed is 5, then the procedure should multiply 8 and 6 and obtain the value 48. If the value passed is 9 and the index position passed is 0, then the procedure should divide 9 by 1 and obtain the value 9.) The procedure should return this new value.
  • The main procedure should receive this new value and overwrite the original value with this new value.
  • Once all the values in the array have been processed, the main procedure should display the contents of the array again, all in one single output.

Notes:

  • Your program should guard against integers outside the required range. If the user enters an invalid number, your program should display an error message, and repeatedly ask for a new value until the user enters a valid number.

  • You MUST use exactly one numerical array. No more. Of course, you will have a string (or array of characters) for the display. That's OK.
  • Your output should have message headers that are informative as to what you are displaying.
  • You MUST include ample, meaningful comments. Points will be deducted for hard to read code. Comments really help readability.
  • Make sure your interaction with the user is informative.

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_2

Step: 3

blur-text-image_3

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