![Lang - 2018 monthly planner -](https://kumkoniak.com/46.jpg)
The isLeapYear(int year) method can be implemented using the following code: return (year % 400 = 0 || (year % 4 = 0 & year % 100 != 0)) To avoid this error, add an if statement to check the input before printing the calendar. For instance, if the user enters either a month not in the range between 1 and 12 or a year before 1800, the program would display an erroneous calendar. To print a body, first pad some space before the start day and then print the lines for every week, as shown in the output.
![lang - 2018 monthly planner - lang - 2018 monthly planner -](https://cdn1.vectorstock.com/i/1000x1000/88/35/english-calendar-planner-for-year-2018-12-months-vector-19098835.jpg)
You are free to solve the problem in your own way, or you could follow with the tips as long as you get same output.
![lang - 2018 monthly planner - lang - 2018 monthly planner -](https://cdn11.bigcommerce.com/s-7edce/images/stencil/1000x1000/products/6817/125770/Ardium-2018-Korean-paper-dated-monthly-planner-agenda-15__82550.1513751414.jpg)
Write a program that prompt the user to enter the year and the month and later print the calendar for the month of the year.
![Lang - 2018 monthly planner -](https://kumkoniak.com/46.jpg)