Pure Programmer
Blue Matrix

Cluster Map

Project: Dog Years

It is said that dogs age in one year the equivalent of seven years of human grown. A puppy of one year is the same as a human of seven years. A dog of two years of age is equivalent to a human teenager of 14. Write a program that uses integer constants and variables to compute the equivalent ages of a dog of 1, 2, 5 and 10 years. Use * as the symbol for multiplication.

$ g++ -std=c++17 DogYears.cpp -o DogYears -lfmt $ ./DogYears 1 dog years = 7 human years 2 dog years = 14 human years 5 dog years = 35 human years 10 dog years = 70 human years