In the following code, state and nextstate are integers with a range of 0 to 2.
(a) Explain why a latch would be created when the code is synthesized.
(b) What signal would appear at the latch output?
(c) Make changes in the code which would eliminate the latch.