How to find out the output of state machine if not listed
Your example requires 3 registers xxx shown in each state.  All 3 registers define a unique state of which there are 5 shown.

You can define another output =1 uniquely from each state with gates or use the 3 registers as your outputs as shown.  Undefined states, not shown are 011,110,111 or 3,6,7 in BCD. It is assumed a clock transition defines the next state from the present state.

A register is merely a memory state using a Flip Flop.