Question: Trace the pseudocode: for the sequence 30,2,1,4,2,5,-1,3,4,5 J = 0 Sum = 0 Product = 1 Read A While ( A is not equal to
Trace the pseudocode: for the sequence 30,2,1,4,2,5,-1,3,4,5
J = 0
Sum = 0
Product = 1
Read A
While ( A is not equal to -1) ( Sum = sum + A
Product = product * A
J = j + 1
Print j, sum, product
Read A )
Print out final values of product, sum and j
In other words, show the output at each of the print statements
b) Determine the total numner of operations in this algorithm
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
