Question: Assume two boxes (box A and box B). Each contains zero or more books. What will be left in the boxes after the instructions
Assume two boxes (box "A" and box "B"). Each contains zero or more books. What will be left in the boxes after the instructions below are executed if i) "A" contains 11 books, "B" contains 2 books? ii) "A" contains 5 books, "B" contains 7 books? if (box "A" contains more than 6 books) then while (box "A" contains more books than box "B") do if (box "A" contains more than 4 books) then move 4 books from box "A" to box "B" else else endif endwhile move I book from box "A" to box "B" Imove everything in box "B" to box "A" endif Draw a flow chart for the instructions.
Step by Step Solution
There are 3 Steps involved in it
OUTPUT 1 A3 B10 2 A12 B0 FL... View full answer
Get step-by-step solutions from verified subject matter experts
