A café loyalty card holds stamps. When a card has 9 or more stamps, the customer gets a free drink and 9 stamps are taken off the card.
This pseudocode runs when a customer with 7 stamps buys 5 drinks:
Stamps ← 7Bought ← 5Stamps ← Stamps + BoughtIF Stamps >= 9 THEN Stamps ← Stamps - 9 OUTPUT "Free drink!"ENDIFWhat is the value of Stamps after the pseudocode has run?