## Pseudo Code Library |
||||||||||||

## Dog age in human years (Dog Years)To calculate the age of a dog in human terms, we need to use two different multipliers, A and B. For each of the dog's first two years of life, multiply its age by multiplier A The value of A and B depends on the size of the dog (and in real life, the breed too).
Here is what your program needs to do: - Input the size of dog - limit possible entries to "large", "medium" or "small"
- Input the actual age of the dog in years
- Set multiplier values for A and B based on size
- Set a variable for age of dog up to two years
- Set a variable for age of dog above two years
- Calculate the human years for the first two years
- Add on the human years for the remaining age above two years
- Output the dog's real age and age in human years.
Test it with the following values: Rover is a medium dog aged 5.5 years A=10.5, B=6 Rex is a small dog aged 4 years Bella is a large dog aged 1.5 years. |