Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This is the entire question and all the given information should be enough to solve it as we are required to do so. Just ignore

This is the entire question and all the given information should be enough to solve it as we are required to do so.

Just ignore if you can not answer fully. If the entire question is answered with accuracy I will definitely upvote otherwise downvote. Knowledge about 8086 assembly language is required to answer is this, so do not touch it if you are not proficient in it.

a) First, take a single-digit user input between 5 and 9 (inclusive). Check if the number is between 5 and 9. If not, display: Invalid input! Try again. and prompt the user to enter a number again.

E.g.:

Enter a number between 5 and 9: 6

b) For correct input at (a), depending on the value, prompt the user that many times for inputs, where the user will give single digits (0-9) separated by commas as input. Assume that the user will give proper inputs at this stage.

E.g.:

Please give your inputs:

1,2,3, (6 characters)

c) Split the user input sequence using the comma, and store the individual digits in an array.

E.g.:

1

2

3

d) Print these numbers from the array on separate lines.

E.g.:

Extracted digits are:

1

2

3

e) Define a procedure called sq_gen that will take these digits from the array as input and find their respective squares. Display the squares separated by commas as output in a single line.

E.g.:

The squares are: 1,4,9

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

Practical Database Programming With Visual C# .NET

Authors: Ying Bai

1st Edition

0470467274, 978-0470467275

More Books

Students also viewed these Databases questions