Tracking unread input when bookings fill the workshop

A workshop has 12 available seats. Its booking flowchart receives group sizes in this order: 4, 10, 3, 5, 0. Each Read next group size consumes only the next value. Zero is a sentinel, rather than a booking request. A rejected group is skipped, and accepted counts groups rather than people. The symbol ←\leftarrow assigns a value to a variable.


Trace the flowchart and give four exact integers: the remaining seats displayed, the accepted groups displayed, the number of input values read, and the number of times the remaining is zero decision is evaluated.


A booking flowchart reads group sizes, rejects groups that do not fit, and stops when full or when zero is read.


Your answers

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

More Flowcharts Questions: