The last day of a month

Report a typo

We normally speak of a day by addressing a month, for example, August 30. Another way to indicate a day is to give an order number to each day in a year. Then we could say, for example, "242nd day of the year".

Write a program that reads a year and the number of a day in this year, and checks if the day is the last day of a month or not.

The program must output either "true" or "false".

Sample Input 1:

2017 31

Sample Output 1:

true
Write a program in Java 17
class Main {
public static void main(String[] args) {
// put your code here
}
}
___

Create a free account to access the full topic