Details of this Paper

Write an assembly language program which receives a list of numbers as input (N) and separately computes and prints the...

Description

solution


Question

Write an assembly language program which receives a list of numbers as input (N) and separately computes and prints the sum of all positive numbers and all negative numbers and stops when it sees the value 0. For example, given the input 12, ?2, 14, 1, ?7, 0 your program should output the two values 27 (the sum of the three positive values 12, 14, and 1) and ?9 (the sum of the two negative numbers ?2 and ?7) and then halt.

 

Paper#72791 | Written in 18-Jul-2015

Price : $22
SiteLock