Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Display \"Time\'s up 3. The programmer intended the following pseudocode to get

ID: 3904740 • Letter: D

Question

Display "Time's up 3. The programmer intended the following pseudocode to get five sets of two bers each, calculate the sum of each set, and calculate the sum of all the numbe entered. It will not function as intended, however. Find the error. // This program calculates the sum of five sets of two numbers Declare Integer number, sum, total Declare Integer sets, numbers rs Constant Integer MAX_SETS 5 constant Integer MAX NUMBERS = 2 set sum = 0; set total = 0; For sets = 1 TO MAX NUMBERS For numbers = 1 TO MAX SETS Display "Enter number ", numbers, " of set ",sets, "." Input number; Set sumsum + number End For Display "The sum of set ", sets, " is", sum, "." Set total- total sum set sum = 0 End For Display "The total of all the sets is ", total, "."

Explanation / Answer

The error here is in for loops. Here we have taken sets = 1 from MAX_NUMBERS.Here MAX_NUMBERS is 2 sp as per above code we are taking 2 sets which was wrong we have to change that to MAX_SETS and also we have to change inner for loop iteration from numbers = 1 to MAX_NUMBERS