Soda Inventory Algorithm WITHOUT arrays

Data Declarations
       
   Coke_Stock, Pepsi_Stock, 
   Jolt_Stock, Sprite_Stock   INTEGER        -- Inventory amounts

   Brandname                  CHARACTER      -- user's input
   Amount                     INTEGER        -- transaction amount
   TransactionCount           INTEGER        -- number of transactions

--------------------------------------------------------------------------
MAIN
   Startup
   Transactions
   Final

--------------------------------------------------------------------------
STARTUP
      Display Title and directions
      Set TransactionCount to zero
      Prompt for Starting Inventory
      Read initial Inventory amount for each brand

--------------------------------------------------------------------------
TRANSACTIONS 
      Prompt for transactions
      Get a Brandname
      
      WHILE Brandname /= Quit LOOP

         Get amount
         IF Brandname is Coke THEN                        
               Increment Coke_Stock by Amount
            ELSE IF Brandname is Pepsi THEN
               Increment Pepsi_Stock by Amount
            ELSE IF Brandname is Jolt THEN
               Increment Jolt_Stock by Amount
            ELSE IF Brandname is Sprite THEN
               Increment Sprite_Stock by Amount
            ELSE IF Brandname is Quit THEN
               Put "End of Data"
            ELSE 
               Put "Invalid Brand name, transaction ignored"
         END IF
         
         Increment TransactionCount
         Prompt for another transaction
         Get next Brandname
      END WHILE 

--------------------------------------------------------------------------
FINAL 
      Display Title
      Display Amount for each brandname
      Display TransactionCount