The requirement is show the date in month.
The solution is fine the function that print date in month from 2 input values.
Algorithmic approach - get input 3 data (year , month , date ) then convert year, first 2 digits is century and last 2 digits is year. And then sent year and month to function that print month.
Overall program step
First, the program will get input data. Then convert year to 2 variable century_digit and year_digit. After that set the value with year_digit. Then compute the value before with condition of month. Finally combine the value and day before send year and month to print month function.