Assign integer numBirds with the same value as numSnakes

Check the final answer first, then review the worked steps.

Answer

\(numBirds = numSnakes;\)

Approach

numBirds = numSnakes;

Step-by-step solution

  1. Read the input value into the variable numSnakes using scnr.nextInt().
  2. Assign the value of numSnakes to numBirds as requested.
  3. Print the value of numSnakes followed by the value of numBirds.