Coexisting Chicken and Rabbit Cage

# Introduction In this challenge we will solve the famous "chickens and rabbits in the same cage" problem from the ancient Chinese arithmetic book. The problem requires us to calculate the number of chickens and rabbits in a cage based on the total number of heads and feet. We will use keyboard input, operators, data types, loop statements and conditional statements to write a programme that produces the expected results.

|60 : 00

Click the virtual machine below to start practicing