View Mode
Q: 6
Below is pseudo-code which calculates a customer's cruise credits based on past cruise history: PROGRAM CALC CRUISE CREDITS (CUST_ID) COUNT_CRUISES, CRUISE_CREDITS, LOYALTY_RATING: INTEGER CRUISE_LENGTH, CRUISE_ACCOM_TYPE: VAR LOYALTY_RATING = 0 COUNT_CRUISES = 0 CRUISE_LENGTH = 0 CRUISE_ACCOM_TYPE = 0 BEGIN READ CUSTOMER'S CRUISE HISTORY TO OBTAIN COUNT OF CRUISES READ CRUISE_HISTORY (CUST_ID) WHILE COUNT_CRUISES != -1 DO READ CUSTOMER'S NEXT CRUISE READ NEXT_CRUISE IF CRUISE_ACCOM_TYPE = 3 THEN CRUISE_CREDITS = CRUISE_CREDITS + 5 ELSE IF CRUISE_ACCOM_TYPE = 2 THEN CRUISE_CREDITS = CRUISE_CREDITS + 3 ELSE CRUISE_CREDITS = CRUISE_CREDITS + 2 ENDIF ENDIF COUNT_CRUISES = COUNT_CRUISES - 1 ENDWHILE LOYALTY_RATING = CRUISE_CREDITS / COUNT_CRUISES WRITE ("CRUISE CREDIT TOTAL IS:") WRITE (CRUISE_CREDITS) END PROGRAM CALC CRUISE CREDITS The variable Cruise_Length (line 3) results in which type of data flow anomaly?
Options
Question 6 of 25

Premium Access Includes

  • Quiz Simulator
  • Exam Mode
  • Progress Tracking
  • Question Saving
  • Flash Cards
  • Drag & Drops
  • 3 Months Access
  • PDF Downloads
Get Premium Access
Scroll to Top

FLASH OFFER

Days
Hours
Minutes
Seconds

avail 10% DISCOUNT on YOUR PURCHASE