The first day of a month or not

Report a typo

We are used to talking about days in relation to their position in a month, for example, February 22. But as we've already mentioned, there's another way to address a day: to give an order number to each day in a year. Then we could say, for example, "53rd day of the year".

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

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

Sample Input 1:

2017 31

Sample Output 1:

false
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