Question: 2.27. Complete the pseudocode. MIN and MAX are the lowest and the highest values, respectively, in a set of consecutive whole numbers, and are user-provided

2.27. Complete the pseudocode. MIN and MAX are the lowest and the highest values, respectively, in a set of consecutive whole numbers, and are user-provided input. The loop adds one number at a time in each cycle of the loop, but stops once MAX is added, or the percent increase in the current sum relative to the previous sum becomes less than 5%, whichever comes first. The final sum is then printed INPUT MIN, MAX 20 DOFOR ) = MIN TO MAX ENDDO PRINT Z 2.28. Complete the pseudocode that adds one increment of time DELTA_X for each cycle to get a new value of TOTAL for each cycle, until TOTAL reaches Q DELTA_X, where is a whole number representing the number of cycles. The final value of TOTAL is then printed. DELTA_X and Q are user-provided input values. INPUT DELTA_X TOTAL=0 DOFOR J = 1 To Q ENDDO PRINT TOTAL 2.29. Complete the pseudocode to add one increment of time DELTA_X for each cycle of the loop to get a new value of TOTAL for each cycle, until TOTAL reaches Q' DELTA_X, or TOTAL exceeds 50, whichever comes first. The final value of total is then printed. Q is whole number. Q and DELTA_X are user-provided, INPUT DELTA_Xa TOTAL #0 DOFOR J-1 To Q ENDDO PRINT TOTAL
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
