2013-06-09 12:18:05 UTC
naming of variables!) one consisting of a (positive, integer) number of years, and the other a
(positive, integer) number of months (not necessarily less than 12). Assign some values directly
to these variables, no input is required from the user.
Then the program should calculate a single value in months (equivalent to the total years and
months) and then print all the values (original and calculated), with an adequate message (see
below).
How would you do the inverse process? From a total number of months calculate the number of
years and months (with 11 as the maximum number of months in the final result)?
So that you can better imagine what this program should do, see an example of the execution of
this program (a sample run) next.
First time ever programming, don't really understand the problem. If I assigned a random variable to months and years, how would I continue with the program?