% % Read sequences of integers and output the % sum and count of numbers in the sequence. % -1 ends a sequence % 0 ends the last sequence and the program % var sum,count : int := 0 var input: int sum := 0 count := 0 loop put "Input? " .. get input if input <= 0 then put "Sum = ", sum put "Count = ", count sum := 0 count := 0 else sum := sum + input count := count + 1 end if exit when input = 0 end loop