Fills in an array Vector with at most 50 signed double-word integers from the keyboard; Computes the sum of all the negative values in Vector; Counts the number of all the positive values in Vector; Finds the minimum value between position I and position J of Vector; Checks whether Vector is a palindrome or not

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
Write an ASM program which:
1. Fills in an array Vector with at most 50 signed double-word integers from the
keyboard;
2. Computes the sum of all the negative values in Vector;
3. Counts the number of all the positive values in Vector;
4. Finds the minimum value between position I and position J of Vector;
5. Checks whether Vector is a palindrome or not
Your program will display the following interaction with you (things in reds are your
inputs)
What ia the aize N of Veetor?> 13
Khat are the 13 valuna in Vector?> - -3 -17 o -100 -30 +2 -30 -100 0 -17 +3 -1
Size of Vector la N- 13
Vector - -1 +3 +17 0
-100
-30
+2
-30
-100
+17 + -1
The sun of all the negative values in Vector isi Sun - -262
The mamber of all the positive values in Vector is: Count -5
Please give me two valums I and J wach that 15 I SISN> 2 7
I - 2 and J- 1, and
The ninimum value between position 2 and 7 of Vector ia: Minimu - -100
Vector ia a palindrone because it seads the same way in both directiona.
Repeat with a nex Vector of different size and/ar content? >
a. IfN is negative, the program should display "size must be positive or
zero" and prompts you for N again.
b. If I < 1, or J < 1 or I, or N < 1 or I or J, the program should display
"Invalid I or J" and prompts you for I and J again.
c. If Vector is not a palindrome, the program should display "Vector is NOT a
palindrome".
d. The program repcats again from the first prompt if you type Y to the last question,
otherwise it exits.
Transcribed Image Text:Write an ASM program which: 1. Fills in an array Vector with at most 50 signed double-word integers from the keyboard; 2. Computes the sum of all the negative values in Vector; 3. Counts the number of all the positive values in Vector; 4. Finds the minimum value between position I and position J of Vector; 5. Checks whether Vector is a palindrome or not Your program will display the following interaction with you (things in reds are your inputs) What ia the aize N of Veetor?> 13 Khat are the 13 valuna in Vector?> - -3 -17 o -100 -30 +2 -30 -100 0 -17 +3 -1 Size of Vector la N- 13 Vector - -1 +3 +17 0 -100 -30 +2 -30 -100 +17 + -1 The sun of all the negative values in Vector isi Sun - -262 The mamber of all the positive values in Vector is: Count -5 Please give me two valums I and J wach that 15 I SISN> 2 7 I - 2 and J- 1, and The ninimum value between position 2 and 7 of Vector ia: Minimu - -100 Vector ia a palindrone because it seads the same way in both directiona. Repeat with a nex Vector of different size and/ar content? > a. IfN is negative, the program should display "size must be positive or zero" and prompts you for N again. b. If I < 1, or J < 1 or I, or N < 1 or I or J, the program should display "Invalid I or J" and prompts you for I and J again. c. If Vector is not a palindrome, the program should display "Vector is NOT a palindrome". d. The program repcats again from the first prompt if you type Y to the last question, otherwise it exits.
Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Similar questions
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY