Problem Description:
A farmer has a mix of chickens and dogs on his farm. He knows the total number of animals and the total number of legs, but he isn't sure how many of each he has.
Please help the farmer determine the exact number of chickens and dogs based on this information.
Remember: Chickens have 2 legs and Dogs have 4 legs
Task:
Write a program that asks user to enter two interger number: The total number of animals (Dogs and Chickens) total_animals
and the total number of legs total_legs
Your program should calculate the number of dog and the number of chicken and display the result on the screen as the examples bellow.
Hint:
total_animal = dog + chicken
total_leg = 4*dog + 2*chicken
Solve these fomulars you will get the number of dog and chicken.