Pure Programmer
Blue Matrix


Cluster Map

Project: Dog Years (Command Line)

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 in human years. Pass the number of dog years in on the command line.

See: DogYears

Output
$ node DogYearsCmdLine.js 3 3 dog years = 21 human years

Solution