Question
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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started