Dog Year Calculator

A dog that is 5 Years old is equivalent to a 42 year old human.

The human equivalent age is calcuated using the following method:

  • The user inputs the age of the dog in years
  • If the age is 2 or less, the human equivalent is 12 times the age.
  • If the age is more than 2, the human equivalent is 24 for the first 2 years plus 6 for every additional year.

Write a program that converts the age of a dog to the equivalent for a human.

About CDB 360 Articles
Self-Employed Software Developer, Spark, Property Management, Hobby Forestry, Ex-Teacher, Engineering - Wood, Metal, Electrics & Computers. Outdoors - Walk, Cycle, Kitesurf,

Be the first to comment

Leave a Reply

Your email address will not be published.


*


This site uses Akismet to reduce spam. Learn how your comment data is processed.