Answer:
It is a C++ program. The complete function ConvertToDecadesAndYears which takes totalYears as parameter and convert totalYears to decades and years is provided in the attached document.
Explanation:
The explanation is provided in the attached document.
The screenshot of the complete code along with its output is attached.