I have a state machine diagram, but it does not have any output. How will I know the output?
The output would be the state. The x is assigned to a switch on a board. A clock pulse is then a applied. If x=0 or the switch is off, and a clock pulsed is applied, the 7-seg display will show 4. There will be an infinite loop at state 7, which means that it will show 7 no matter what you do on the circuit once it reaches state 7.