read in integers until a zero is read in keep a


Read in integers until a zero is read in. Keep a total of both the quantity and the sum of the negative integers and the positive integers. Once a zero is read in (signifying the end of the input) then:
• If there were more positive than negative integers, or an equal number, print out a 0 and the sum of the positive integers.
• If there were more negative than positive integers, print out a 1 and the sum of the negative integers.

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: read in integers until a zero is read in keep a
Reference No:- TGS0307611

Expected delivery within 24 Hours